mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Disable "unallocate" button if there are not any allocations
This commit is contained in:
parent
b5e1d3f87a
commit
06a3899325
@ -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-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>';
|
html += '</div>';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user