Files
skeleton-api/app/templates/admin/_augmented_parts_table.html
T

51 lines
2.1 KiB
HTML

<div id="augmented-part-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 %}
<div class="filter-bar">
<form hx-get="/admin/augmented-parts/filter"
hx-target="#augmented-parts-table-card"
hx-trigger="input delay:300ms, change"
hx-swap="outerHTML">
<input type="hidden" name="sort" value="{{ sort }}">
<input type="hidden" name="dir" value="{{ dir }}">
<input type="text" name="description" placeholder="Filter by description or SKU…" value="{{ filter_description or '' }}">
<select name="colour_id">
<option value="">All colours</option>
{% for pc in part_colours %}
<option value="{{ pc.id }}" {{ "selected" if filter_colour_id and filter_colour_id|int == pc.id }}>{{ pc.name }}</option>
{% endfor %}
</select>
<select name="manufacturer_id">
<option value="">All manufacturers</option>
{% for m in manufacturers %}
<option value="{{ m.id }}" {{ "selected" if filter_manufacturer_id and filter_manufacturer_id|int == m.id }}>{{ m.name }}</option>
{% endfor %}
</select>
<select name="scope_model_id">
<option value="">All models</option>
{% for sm in scope_models %}
<option value="{{ sm.id }}" {{ "selected" if filter_scope_model_id and filter_scope_model_id|int == sm.id }}>{{ sm.name }}</option>
{% endfor %}
</select>
<select name="part_type_id">
<option value="">All types</option>
{% for pt in part_types %}
<option value="{{ pt.id }}" {{ "selected" if filter_part_type_id and filter_part_type_id|int == pt.id }}>{{ pt.name }}</option>
{% endfor %}
</select>
<select name="sub_part_type_id">
<option value="">All sub types</option>
{% for spt in sub_part_types %}
<option value="{{ spt.id }}" {{ "selected" if filter_sub_part_type_id and filter_sub_part_type_id|int == spt.id }}>{{ spt.name }}</option>
{% endfor %}
</select>
</form>
</div>
{% include "admin/_augmented_parts_table_card.html" %}
</div>