From 890741ef5d00e1b4507863345446b10116ccc472 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 13 Oct 2021 23:57:50 +1100 Subject: [PATCH] Display badge indicating variant stock can be used --- InvenTree/templates/js/translated/bom.js | 4 ++++ InvenTree/templates/js/translated/build.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index 9d3380c653..048747c6bb 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -378,6 +378,10 @@ function loadBomTable(table, options) { html += makeIconBadge('fa-exchange-alt', '{% trans "Substitutes Available" %}'); } + if (row.allow_variants) { + html += makeIconBadge('fa-sitemap', '{% trans "Variant stock allowed" %}'); + } + // Display an extra icon if this part is an assembly if (sub_part.assembly) { var text = ``; diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index b1e517186a..4dad5dc454 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -738,7 +738,11 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { html += makePartIcons(row.sub_part_detail); if (row.substitutes && row.substitutes.length > 0) { - html += makeIconBadge('fa-exchange-alt', '{% trans "Substitutes Available" %}'); + html += makeIconBadge('fa-exchange-alt', '{% trans "Substitute parts available" %}'); + } + + if (row.allow_variants) { + html += makeIconBadge('fa-sitemap', '{% trans "Variant stock allowed" %}'); } return html;