From 7cf0edd44dc38fadbe89a208cc7133131336e15b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 18 May 2021 18:35:43 +0000 Subject: [PATCH] --- ayanova/src/views/svc-workorder.vue | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index e123b5d7..0e6fb5f9 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -261,8 +261,8 @@ export default { fatal: false, //fatal error, further save is pointless, bail early and report errors: null //contains error objects from save }, - lastGetContractId: null, - lastGetCustomerId: null + lastGetContractId: -1, //note: -1 so that a new record updates + lastGetCustomerId: -1 }; }, //WATCHERS @@ -411,24 +411,24 @@ export default { }); } }, - async submitNewContract() { - //save new contract route, this only ever gets called from a clean wo with no dirty edits so just save the contract and reset the wo from the result - let res = await window.$gz.api.post( - `${API_BASE_URL}set-contract/${this.obj.id}`, - { newContractId: this.obj.contractId } - ); - if (res.error) { - this.formState.serverError = res.error; - window.$gz.form.setErrorBoxErrors(this); - } else { - this.obj = res.data; - window.$gz.form.setFormState({ - vm: this, - dirty: false, - valid: true - }); - } - }, + // async submitNewContract() { + // //save new contract route, this only ever gets called from a clean wo with no dirty edits so just save the contract and reset the wo from the result + // let res = await window.$gz.api.post( + // `${API_BASE_URL}set-contract/${this.obj.id}`, + // { newContractId: this.obj.contractId } + // ); + // if (res.error) { + // this.formState.serverError = res.error; + // window.$gz.form.setErrorBoxErrors(this); + // } else { + // this.obj = res.data; + // window.$gz.form.setFormState({ + // vm: this, + // dirty: false, + // valid: true + // }); + // } + // }, async submit() { const vm = this; if (vm.canSave == false) { @@ -521,8 +521,8 @@ export default { this.$router.push({ name: "workorder-edit", params: { - recordid: vm.obj.id, - obj: vm.obj // Pass data object to new form + recordid: vm.obj.id + // ,obj: vm.obj // Pass data object to new form } }); } else {