62 lines
2.0 KiB
HTML
62 lines
2.0 KiB
HTML
<div id="skipped-parts-list">
|
|
{% if sync_result %}<p class="alert alert-success">{{ sync_result }}</p>{% endif %}
|
|
{% if sync_error %}<p class="alert alert-error">{{ sync_error }}</p>{% endif %}
|
|
|
|
{% if unlinked_parts %}
|
|
<form hx-post="/admin/augmented-parts/skipped"
|
|
hx-target="#skipped-parts-list"
|
|
hx-swap="outerHTML">
|
|
|
|
<div class="card">
|
|
<div class="form-grid">
|
|
<label>Type
|
|
<select name="part_type_id" required>
|
|
<option value="">— select type —</option>
|
|
{% for pt in part_types %}
|
|
<option value="{{ pt.id }}">{{ pt.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<label>Sub Type
|
|
<select name="sub_part_type_id">
|
|
<option value="">— none —</option>
|
|
{% for spt in sub_part_types %}
|
|
<option value="{{ spt.id }}">{{ spt.name }} ({{ spt.part_type.name }})</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<button id="sync-selected-btn" type="submit" class="btn btn-primary">Sync selected</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="overflow-x:auto">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" id="select-all" title="Select all"></th>
|
|
<th>Inventory ID</th>
|
|
<th>Description</th>
|
|
<th>Colour</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for ip in unlinked_parts %}
|
|
<tr>
|
|
<td><input type="checkbox" name="inventory_ids" value="{{ ip.InventoryID }}"></td>
|
|
<td><code>{{ ip.InventoryID }}</code></td>
|
|
<td>{{ ip.Description | truncate(80) if ip.Description else '—' }}</td>
|
|
<td>{{ ip.TBXColour or '—' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</form>
|
|
{% else %}
|
|
<div class="card">
|
|
<p class="muted">No skipped parts — all imported parts have been synchronised.</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|