From b333b1add50ee2fbc584c68a6baeac73f779a5fe Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 18 May 2021 14:04:01 +0000 Subject: [PATCH] --- ayanova/src/views/svc-workorder.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index f501227c..e123b5d7 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -261,7 +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 + lastGetContractId: null, + lastGetCustomerId: null }; }, //WATCHERS @@ -371,6 +372,7 @@ export default { } else { vm.obj = res.data; vm.lastGetContractId = vm.obj.contractId; //preserve for triggering full update if something changes it later + vm.lastGetCustomerId = vm.obj.customerId; //preserve for triggering full update if something changes it later //assign opening UID's vm.obj.items.forEach((z, index) => { @@ -526,7 +528,10 @@ export default { } else { //check if full refresh is necessary - if (vm.obj.contractId != vm.obj.lastGetContractId) { + if ( + vm.obj.contractId != vm.obj.lastGetContractId || + vm.obj.customerId != vm.obj.lastGetCustomerId + ) { //there may be others which is why I'm doing it this way with the extra variable forceFullRefresh = true; } @@ -664,6 +669,7 @@ async function saveHeader(vm) { vm.obj.concurrency = res.data.concurrency; vm.obj.isDirty = false; vm.obj.alertViz = res.data.alertViz; + vm.obj.customerId = res.data.customerId; vm.obj.contractId = res.data.contractId; //may or may not have changed at server, this will ensure entire ui gets updated if it has as all prices may have changed and other stuff // //this sets 'o' to all values in assigned *except* the ones itemized with removedKey which is a fake key and just used for this trick to work