Improve table rendering for build allocation view

This commit is contained in:
Oliver Walters 2019-06-13 22:18:27 +10:00
parent 38001b5358
commit 73b9881dc5
2 changed files with 10 additions and 7 deletions

View File

@ -62,7 +62,10 @@ InvenTree | Allocate Parts
{% else %}
$("#build-list").bootstrapTable({});
$("#build-list").bootstrapTable({
search: true,
sortable: true,
});
$("#btn-allocate").click(function() {
location.href = "{% url 'build-allocate' build.id %}?edit=1";

View File

@ -10,12 +10,12 @@
<table class='table table-striped table-condensed' id='build-list' data-sorting='true' data-toolbar='#build-item-toolbar'>
<thead>
<tr>
<th>Part</th>
<th data-sortable='true'>Part</th>
<th>Description</th>
<th>Available</th>
<th>On Order</th>
<th>Required</th>
<th>Allocated</th>
<th data-sortable='true'>Available</th>
<th data-sortable='true'>Required</th>
<th data-sortable='true'>Allocated</th>
<th data-sortable='true'>On Order</th>
</tr>
</thead>
<tbody>
@ -27,9 +27,9 @@
</td>
<td>{{ item.part.description }}</td>
<td>{{ item.part.total_stock }}</td>
<td>{{ item.part.on_order }}</td>
<td>{{ item.quantity }}</td>
<td>{{ item.allocated }}</td>
<td>{{ item.part.on_order }}</td>
</tr>
{% endfor %}
</tbody>