From b7e7543be65af7a4de6ed1a0f712f00ac8940adf Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 24 Oct 2020 12:59:05 +1100 Subject: [PATCH] Add some more buttons to build table --- InvenTree/templates/js/build.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/build.js b/InvenTree/templates/js/build.js index 2393350fc0..d5ddf68bfa 100644 --- a/InvenTree/templates/js/build.js +++ b/InvenTree/templates/js/build.js @@ -464,7 +464,15 @@ function loadBuildOutputAllocationTable(buildId, partId, output, options={}) { // Generate action buttons for this build output var html = `
`; - html += makeIconButton('fa-plus icon-green', 'button-add', row.sub_part, '{% trans "Allocate stock" %}'); + if (row.sub_part_detail.assembly) { + html += makeIconButton('fa-tools icon-blue', 'button-build', row.sub_part, '{% trans "Build stock" %}', {disabled: true}); + } + + if (row.sub_part_detail.purchaseable) { + html += makeIconButton('fa-shopping-cart icon-blue', 'button-buy', row.sub_part, '{% trans "Order stock" %}', {disabled: true}); + } + + html += makeIconButton('fa-sign-in-alt icon-green', 'button-add', row.sub_part, '{% trans "Allocate stock" %}'); html += '
';