33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
<label class="form-label mt-2">Assigned Inventory</label>
|
|
{% set inv = field['template_ctx']['values']['inventory'] %}
|
|
|
|
<div class="table-responsive border overflow-y-auto" style="max-height: 45vh;">
|
|
<table class="table table-sm table-bordered table-striped table-hover mb-0">
|
|
{% if inv %}
|
|
<thead>
|
|
<tr>
|
|
<th class="position-sticky top-0 bg-body z-1 border">Device</th>
|
|
<th class="position-sticky top-0 bg-body z-1 border">Brand</th>
|
|
<th class="position-sticky top-0 bg-body z-1 border">Model</th>
|
|
<th class="position-sticky top-0 bg-body z-1 border">Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in inv if i['condition.category'] not in ['Disposed', 'Administrative'] %}
|
|
<tr style="cursor: pointer;" onclick="location.href='{{ url_for('entry.entry', model='inventory', id=i.id) }}'">
|
|
<td>{{ i.label }}</td>
|
|
<td>{{ i['brand.name'] }}</td>
|
|
<td>{{ i.model }}</td>
|
|
<td>{{ i['device_type.description'] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
{% else %}
|
|
<thead>
|
|
<tr>
|
|
<th colspan="4" class="text-center">No data.</th>
|
|
</tr>
|
|
</thead>
|
|
{% endif %}
|
|
</table>
|
|
</div>
|