From 9149619f38264c5fbc00898ae8fdec41e67138da Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 12 May 2019 13:12:04 +1000 Subject: [PATCH] Make BOM tab badge red if the BOM is not validated --- InvenTree/part/models.py | 2 +- InvenTree/part/templates/part/tabs.html | 2 +- InvenTree/static/css/inventree.css | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 434c91be1a..22b0073e6c 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -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 diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index d8e84a6f09..ff2cbbf4a0 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -12,7 +12,7 @@ {% endif %} {% if part.buildable %} - BOM{{ part.bom_count }} + BOM{{ part.bom_count }} Build{{ part.active_builds|length }} {% endif %} diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index 9ce6f52400..49e2d636c7 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -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;