Adding post-import adjustments
This commit is contained in:
1 parent
c320595423
commit
87019ff2af
6 files changed
+170
-3
No files matched your search
@@ -0,0 +1,58 @@
|
||||
<div id="unlinked-parts-list">
|
||||
{% if unlinked_parts %}
|
||||
<div class="card">
|
||||
<h2>Skipped Imported Parts</h2>
|
||||
<p class="muted">These parts were skipped during sync because no Part Type could be inferred from their description. Assign a type and click Sync to create the Augmented Part entry.</p>
|
||||
{% if unlinked_sync_result %}<p class="alert alert-success">{{ unlinked_sync_result }}</p>{% endif %}
|
||||
{% if unlinked_sync_error %}<p class="alert alert-error">{{ unlinked_sync_error }}</p>{% endif %}
|
||||
<div style="overflow-x:auto">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Inventory ID</th>
|
||||
<th>Description</th>
|
||||
<th>Colour</th>
|
||||
<th>Type</th>
|
||||
<th>Sub Type</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ip in unlinked_parts %}
|
||||
<tr>
|
||||
<td><code>{{ ip.InventoryID }}</code></td>
|
||||
<td>{{ ip.Description | truncate(60) if ip.Description else '—' }}</td>
|
||||
<td>{{ ip.TBXColour or '—' }}</td>
|
||||
<td>
|
||||
<select name="part_type_id" form="unlinked-sync-{{ loop.index }}" required>
|
||||
<option value="">— select —</option>
|
||||
{% for pt in part_types %}
|
||||
<option value="{{ pt.id }}">{{ pt.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="sub_part_type_id" form="unlinked-sync-{{ loop.index }}">
|
||||
<option value="">— none —</option>
|
||||
{% for spt in sub_part_types %}
|
||||
<option value="{{ spt.id }}">{{ spt.name }} ({{ spt.part_type.name }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<form id="unlinked-sync-{{ loop.index }}"
|
||||
hx-post="/admin/augmented-parts/unlinked"
|
||||
hx-target="#augmented-parts-sections"
|
||||
hx-swap="outerHTML">
|
||||
<input type="hidden" name="inventory_id" value="{{ ip.InventoryID }}">
|
||||
<button type="submit" class="btn btn-primary">Sync</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in new issue
Block a user