Adding augmented parts
This commit is contained in:
1 parent
2e7002b73b
commit
00fb43c8ed
14 files changed
+590
-2
No files matched your search
@@ -0,0 +1,59 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Augmented Parts · {{ app_name }}{% endblock %}
|
||||
{% block body %}
|
||||
{% include "_nav.html" %}
|
||||
<main class="container">
|
||||
<h1>Augmented Parts</h1>
|
||||
|
||||
<div class="card">
|
||||
<h2>Add part</h2>
|
||||
<form hx-post="/admin/augmented-parts" hx-target="#augmented-part-list" hx-swap="outerHTML" class="form-grid">
|
||||
<label>SKU <input type="text" name="sku" placeholder="optional"></label>
|
||||
<label>Description <input type="text" name="description" required></label>
|
||||
<label>Colour
|
||||
<select name="colour_id" required>
|
||||
<option value="">— select —</option>
|
||||
{% for pc in part_colours %}
|
||||
<option value="{{ pc.id }}">{{ pc.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>Manufacturer
|
||||
<select name="manufacturer_id" required>
|
||||
<option value="">— select —</option>
|
||||
{% for m in manufacturers %}
|
||||
<option value="{{ m.id }}">{{ m.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>Model
|
||||
<select name="scope_model_id">
|
||||
<option value="">— none —</option>
|
||||
{% for sm in scope_models %}
|
||||
<option value="{{ sm.id }}">{{ sm.name }} ({{ sm.manufacturer.name }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>Type
|
||||
<select name="part_type_id" required>
|
||||
<option value="">— select —</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 type="submit" class="btn btn-primary">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% include "admin/_augmented_parts_table.html" %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user