add lots tab in device details

This commit is contained in:
Cayo Puigdefabregas 2022-05-05 12:31:29 +02:00
parent 1c670641f4
commit 33fd574f18
1 changed files with 48 additions and 0 deletions

View File

@ -30,6 +30,10 @@
<a class="nav-link" href="{{ device.public_link }}" target="_blank">Web</a>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#lots">Lots</button>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#status">Status</button>
</li>
@ -73,6 +77,50 @@
</div>
</div>
<div class="tab-pane fade profile-overview" id="lots">
<h5 class="card-title">Incoming Lots</h5>
<div class="row">
{% for lot in device.lots %}
{% if lot.is_incoming %}
<div class="col">
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
<span>{{ lot.name }}</span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
<h5 class="card-title">Outgoing Lots</h5>
<div class="row">
{% for lot in device.lots %}
{% if lot.is_outgoing %}
<div class="col">
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
<span>{{ lot.name }}</span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
<h5 class="card-title">Temporary Lots</h5>
<div class="row">
{% for lot in device.lots %}
{% if lot.is_temporary %}
<div class="col">
<a class="ms-3" href="{{ url_for('inventory.lotdevicelist', lot_id=lot.id) }}">
<span>{{ lot.name }}</span>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="tab-pane fade profile-overview" id="status">
<h5 class="card-title">Status Details</h5>
<div class="row">