Add Stock overview to component detail apge

This commit is contained in:
2021-11-12 20:31:34 +01:00
parent 4fe9bb1431
commit 5c3197e040
2 changed files with 20 additions and 8 deletions

View File

@@ -89,7 +89,7 @@
<tr>
<td><input type="text" class="form-control" name="{{f.parameter_type.name}}" value="{{f.parameter_type.value}}"></td>
<td><input type="text" class="form-control" name="{{f.value.name}}" value="{{f.value.value}}"></td>
<td>{{f.parameter_type_object.unit}}</td>
<td>{{f.parameter_type_object.unit|default_if_none:""}}</td>
</tr>
{% endfor %}
</tbody>
@@ -99,6 +99,20 @@
</div>
<div class="col">
<h2>Stocks</h2>
<table class="table">
<thead>
<th scope="col">Storage</th>
<th scope="col">Amount</th>
</thead>
<tbody>
{% for stock in stocks %}
<tr>
<td><a class="text-decoration-none text-primary" href="{% url 'parts-stocks-detail' uuid=stock.storage.id %}">{{stock.storage.get_full_path}}</a></td>
<td>{{stock.amount}}</td>
<tr>
{% endfor %}
</tbody>
</table>
</div>
</div>