Refactor inventory filtering and enhance templates with select inputs for improved data handling
This commit is contained in:
parent
ffaae2541f
commit
684a98b216
4 changed files with 26 additions and 13 deletions
|
@ -60,9 +60,13 @@ submit_button=True) }}
|
|||
<input type="text" class="form-control" name="model" placeholder="-" value="{{ item.model }}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<label for="category" class="form-label">Category</label>
|
||||
<input type="text" class="form-control" name="category" placeholder="-"
|
||||
value="{{ item.item.description }}">
|
||||
<label for="type" class="form-label">Category</label>
|
||||
<select name="type" id="type" class="form-select">
|
||||
<option>-</option>
|
||||
{% for t in types %}
|
||||
<option value="{{ t.id }}"{% if t.id == item.type_id %} selected{% endif %}>{{ t.description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
|
@ -83,7 +83,7 @@ title=title
|
|||
<div class="row my-3">
|
||||
{% for id, name in line %}
|
||||
<div class="col text-center">
|
||||
<a href="{{ url_for('main.list_inventory', filter_by='user', id=id) }}" class="link-success link-underline-opacity-0">{{ name }}</a>
|
||||
<a href="{{ url_for('main.list_inventory', filter_by=category, id=id) }}" class="link-success link-underline-opacity-0">{{ name }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue