This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user