mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Improve dialog message when allocating stock to a build order
This commit is contained in:
parent
70c9c9473d
commit
d06def3c29
@ -1513,6 +1513,16 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
||||
*/
|
||||
function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
|
||||
if (bom_items.length == 0) {
|
||||
|
||||
showAlertDialog(
|
||||
'{% trans "Select Parts" %}',
|
||||
'{% trans "You must select at least one part to allocate" %}',
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// ID of the associated "build output" (or null)
|
||||
var output_id = options.output || null;
|
||||
|
||||
@ -1627,8 +1637,8 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
if (table_entries.length == 0) {
|
||||
|
||||
showAlertDialog(
|
||||
'{% trans "Select Parts" %}',
|
||||
'{% trans "You must select at least one part to allocate" %}',
|
||||
'{% trans "All Parts Allocated" %}',
|
||||
'{% trans "All selected parts have been fully allocated" %}',
|
||||
);
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user