disable completing incomplete work orders

deepsource-autofix-76c6eb20
Dan Gowans 2022-12-15 11:44:25 -05:00
parent c4397444e5
commit 7b72328176
3 changed files with 17 additions and 9 deletions

View File

@ -61,14 +61,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
return !milestone.workOrderMilestoneCompletionDate;
});
if (hasOpenMilestones) {
bulmaJS.confirm({
title: "Close Work Order with Outstanding Milestones",
message: "Are you sure you want to close this work order with outstanding milestones?",
contextualColorName: "danger",
okButton: {
text: "Yes, Close Work Order",
callbackFunction: doClose
}
bulmaJS.alert({
title: "Outstanding Milestones",
message: "You cannot close a work order with outstanding milestones." +
" Either complete the outstanding milestones, or remove them from the work order.",
contextualColorName: "warning"
});
}
else {

View File

@ -102,6 +102,16 @@ declare const bulmaJS: BulmaJS;
});
if (hasOpenMilestones) {
bulmaJS.alert({
title: "Outstanding Milestones",
message:
"You cannot close a work order with outstanding milestones." +
" Either complete the outstanding milestones, or remove them from the work order.",
contextualColorName: "warning"
});
/*
// Disable closing work orders with open milestones
bulmaJS.confirm({
title: "Close Work Order with Outstanding Milestones",
message:
@ -112,6 +122,7 @@ declare const bulmaJS: BulmaJS;
callbackFunction: doClose
}
});
*/
} else {
bulmaJS.confirm({
title: "Close Work Order",

File diff suppressed because one or more lines are too long