diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 3f64633062..d9515dbff9 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -81,6 +81,15 @@ max-width: 250px; } +.bomrowvalid { + color: #050; +} + +.bomrowinvalid { + color: #A00; + font-style: italic; +} + /* Part image icons with full-display on mouse hover */ .hover-img-thumb { diff --git a/InvenTree/InvenTree/static/script/inventree/bom.js b/InvenTree/InvenTree/static/script/inventree/bom.js index 450fdeb503..2da80c6138 100644 --- a/InvenTree/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/InvenTree/static/script/inventree/bom.js @@ -113,14 +113,19 @@ function loadBomTable(table, options) { ]; if (options.editable) { + + /* + // TODO - Enable multi-select functionality cols.push({ checkbox: true, title: 'Select', searchable: false, sortable: false, }); + */ } + // Part column cols.push( { @@ -230,10 +235,27 @@ function loadBomTable(table, options) { if (options.editable) { cols.push({ formatter: function(value, row, index, field) { + + var bValidate = ""; + var bValid = ""; + var bEdit = ""; var bDelt = ""; - return "
" + bEdit + bDelt + "
"; + var html = "
"; + + html += bEdit; + html += bDelt; + + if (!row.validated) { + html += bValidate; + } else { + html += bValid; + } + + html += "
"; + + return html; } }); } @@ -256,6 +278,13 @@ function loadBomTable(table, options) { table.bootstrapTable({ sortable: true, search: true, + rowStyle: function(row, index) { + if (row.validated) { + return {classes: 'bomrowvalid'}; + } else { + return {classes: 'bomrowinvalid'}; + } + }, formatNoMatches: function() { return "No BOM items found"; }, clickToSelect: true, showFooter: true, diff --git a/Makefile b/Makefile index 0b3379a724..aaf795144e 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ migrate: python3 InvenTree/manage.py migrate python3 InvenTree/manage.py migrate --run-syncdb python3 InvenTree/manage.py check + python3 InvenTree/manage.py collectstatic # Install all required packages install: