Show which parts are short in build view

This commit is contained in:
Oliver Walters 2019-09-16 08:23:40 +10:00
parent fedbb834ee
commit 628a58e8fc
3 changed files with 5 additions and 5 deletions

View File

@ -98,11 +98,11 @@
max-width: 250px;
}
.bomrowvalid {
.rowvalid {
color: #050;
}
.bomrowinvalid {
.rowinvalid {
color: #A00;
font-style: italic;
}

View File

@ -280,9 +280,9 @@ function loadBomTable(table, options) {
search: true,
rowStyle: function(row, index) {
if (row.validated) {
return {classes: 'bomrowvalid'};
return {classes: 'rowvalid'};
} else {
return {classes: 'bomrowinvalid'};
return {classes: 'rowinvalid'};
}
},
formatNoMatches: function() { return "No BOM items found"; },

View File

@ -21,7 +21,7 @@
</thead>
<tbody>
{% for item in build.required_parts %}
<tr>
<tr {% if build.status == BuildStatus.PENDING %}class='{% if item.part.total_stock > item.quantity %}rowvalid{% else %}rowinvalid{% endif %}'{% endif %}>
<td>
{% include "hover_image.html" with image=item.part.image hover=True %}
<a class='hover-icon'a href="{% url 'part-detail' item.part.id %}">{{ item.part.full_name }}</a>