mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 21:16:46 +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
|
@transaction.atomic
|
||||||
def validate_bom(self, user):
|
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
|
- Calculates and stores the hash for the BOM
|
||||||
- Saves the current date and the checking user
|
- Saves the current date and the checking user
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.buildable %}
|
{% if part.buildable %}
|
||||||
<li{% ifequal tab 'bom' %} class="active"{% endifequal %}>
|
<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 %}>
|
<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>
|
<a href="{% url 'part-build' part.id %}">Build<span class='badge'>{{ part.active_builds|length }}</span></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
color: #ffcc00;
|
color: #ffcc00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CSS overrides for treeview */
|
/* CSS overrides for treeview */
|
||||||
.expand-icon {
|
.expand-icon {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
@ -97,6 +98,10 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-alert {
|
||||||
|
background-color: #f33;
|
||||||
|
}
|
||||||
|
|
||||||
.part-thumb {
|
.part-thumb {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user