mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-06 02:11:16 +00:00
Disable "unallocate" button if there are not any allocations
This commit is contained in:
1 parent
b5e1d3f87a
commit
06a3899325
1 file changed
+7
-1
@@ -576,7 +576,13 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
||||
html += makeIconButton('fa-sign-in-alt icon-green', 'button-add', row.sub_part, '{% trans "Allocate stock" %}');
|
||||
}
|
||||
|
||||
html += makeIconButton('fa-times-circle icon-red', 'button-unallocate', row.sub_part, '{% trans "Unallocate stock" %}');
|
||||
html += makeIconButton(
|
||||
'fa-minus-circle icon-red', 'button-unallocate', row.sub_part,
|
||||
'{% trans "Unallocate stock" %}',
|
||||
{
|
||||
disabled: row.allocations == null
|
||||
}
|
||||
);
|
||||
|
||||
html += '</div>';
|
||||
|
||||
|
||||
Reference in new issue
Block a user