diff --git a/ayanova/src/components/work-order-items.vue b/ayanova/src/components/work-order-items.vue index ab6124da..673f4f54 100644 --- a/ayanova/src/components/work-order-items.vue +++ b/ayanova/src/components/work-order-items.vue @@ -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