This commit is contained in:
@@ -879,15 +879,12 @@ export default {
|
|||||||
User is left with a existing wo opened, a new woitem added and the wo is dirty and ready to save
|
User is left with a existing wo opened, a new woitem added and the wo is dirty and ready to save
|
||||||
|
|
||||||
*/
|
*/
|
||||||
console.log("C1111OPY ITEM TO WO CALLED");
|
|
||||||
|
|
||||||
if (!this.copyItemWoNumber) {
|
if (!this.copyItemWoNumber) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("dirty?", this.value.formState);
|
if (this.pvm.formState.dirty) {
|
||||||
|
|
||||||
if (this.value.formState.dirty) {
|
|
||||||
if ((await window.$gz.dialog.confirmLeaveUnsaved()) !== true) {
|
if ((await window.$gz.dialog.confirmLeaveUnsaved()) !== true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,16 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
||||||
|
//check for copy wo item on route params
|
||||||
|
let cp = this.$route.params.copyItem;
|
||||||
|
if (cp) {
|
||||||
|
cp.id = 0;
|
||||||
|
cp.concurrency = 0;
|
||||||
|
cp.uid = Date.now();
|
||||||
|
cp.isDirty = true;
|
||||||
|
console.log("copy item is", JSON.stringify(cp));
|
||||||
|
vm.obj.items.push(cp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//new path
|
//new path
|
||||||
|
|||||||
Reference in New Issue
Block a user