mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
67 lines
No EOL
2.6 KiB
Twig
67 lines
No EOL
2.6 KiB
Twig
{% import "helper.twig" as helper %}
|
|
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
|
|
|
|
<table class="table table-striped table-hover table-responsive-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans %}part_lots.description{% endtrans %}</th>
|
|
<th>{% trans %}part_lots.storage_location{% endtrans %}</th>
|
|
<th>{% trans %}part_lots.amount{% endtrans %}</th>
|
|
<th></th> {# Tags row #}
|
|
<th></th> {# Button row #}
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for lot in part.partLots %}
|
|
<tr>
|
|
<td>{{ lot.description }}</td>
|
|
<td>
|
|
{% if lot.storageLocation %}
|
|
{{ helper.structural_entity_link(lot.storageLocation) }}
|
|
{% else %}
|
|
<span class="badge rounded-pill bg-warning">
|
|
<i class="fas fa-question-circle fa-fw"></i> {% trans %}part_lots.location_unknown{% endtrans %}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if lot.instockUnknown %}
|
|
<span class="badge rounded-pill bg-warning">
|
|
<i class="fas fa-question-circle fa-fw"></i> {% trans %}part_lots.instock_unknown{% endtrans %}
|
|
</span>
|
|
{% else %}
|
|
{{ lot.amount | amountFormat(part.partUnit, {'decimals': 5}) }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<h6>
|
|
{% if lot.expirationDate %}
|
|
<span class="badge bg-info" title="{% trans %}part_lots.expiration_date{% endtrans %}">
|
|
<i class="fas fa-calendar-alt fa-fw"></i> {{ lot.expirationDate | format_date() }}
|
|
</span>
|
|
{% endif %}
|
|
{% if lot.expired %}
|
|
<br>
|
|
<span class="badge bg-warning">
|
|
<i class="fas fa-exclamation-circle fa-fw"></i>
|
|
{% trans %}part_lots.is_expired{% endtrans %}
|
|
</span>
|
|
{% endif %}
|
|
{% if lot.needsRefill %}
|
|
<br>
|
|
<span class="badge bg-warning">
|
|
<i class="fas fa-dolly fa-fw"></i>
|
|
{% trans %}part_lots.need_refill{% endtrans %}
|
|
</span>
|
|
{% endif %}
|
|
</h6>
|
|
</td>
|
|
<td>
|
|
{{ dropdown.profile_dropdown('part_lot', lot.id, false) }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
|
|
</table> |