mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Make BOM tab badge red if the BOM is not validated
This commit is contained in:
parent
06deccca1c
commit
9149619f38
@ -505,7 +505,7 @@ class Part(models.Model):
|
||||
|
||||
@transaction.atomic
|
||||
def validate_bom(self, user):
|
||||
""" Check the BOM (mark the BOM as validated by the given User.
|
||||
""" Validate the BOM (mark the BOM as validated by the given User.
|
||||
|
||||
- Calculates and stores the hash for the BOM
|
||||
- Saves the current date and the checking user
|
||||
|
@ -12,7 +12,7 @@
|
||||
{% endif %}
|
||||
{% if part.buildable %}
|
||||
<li{% ifequal tab 'bom' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-bom' part.id %}">BOM<span class="badge">{{ part.bom_count }}</span></a></li>
|
||||
<a href="{% url 'part-bom' part.id %}">BOM<span class="badge{% if part.is_bom_valid == False %} badge-alert{% endif %}">{{ part.bom_count }}</span></a></li>
|
||||
<li{% ifequal tab 'build' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-build' part.id %}">Build<span class='badge'>{{ part.active_builds|length }}</span></a></li>
|
||||
{% endif %}
|
||||
|
@ -14,6 +14,7 @@
|
||||
color: #ffcc00;
|
||||
}
|
||||
|
||||
|
||||
/* CSS overrides for treeview */
|
||||
.expand-icon {
|
||||
font-size: 11px;
|
||||
@ -97,6 +98,10 @@
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.badge-alert {
|
||||
background-color: #f33;
|
||||
}
|
||||
|
||||
.part-thumb {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
|
Loading…
Reference in New Issue
Block a user