This commit is contained in:
2021-07-06 23:58:02 +00:00
parent e7110c3d2a
commit 1100bc3151

View File

@@ -879,10 +879,20 @@ export default {
User is left with a existing wo opened, a new woitem added and the wo is dirty and ready to save
*/
console.log("COPY ITEM TO WO CALLED");
if (!this.copyItemWoNumber) {
return;
}
console.log("dirty?", this.value.formState);
if (this.value.formState.dirty) {
if ((await window.$gz.dialog.confirmLeaveUnsaved()) !== true) {
return;
}
}
//get id from number then push open
let res = await window.$gz.api.get(
"workorder/id-from-number/" + this.copyItemWoNumber