This commit is contained in:
@@ -451,6 +451,10 @@ export default {
|
||||
|
||||
const isPost = vm.obj.id == 0;
|
||||
|
||||
//some ops require a full refresh like ones that trigger contract changes
|
||||
let forceFullRefresh = false;
|
||||
let contractIdBeforeSave = vm.obj.contractId;
|
||||
|
||||
//reset error object
|
||||
this.saveResult.fatal = false;
|
||||
this.saveResult.errors = null;
|
||||
@@ -519,11 +523,21 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false,
|
||||
valid: true
|
||||
});
|
||||
//check if full refresh is necessary
|
||||
if (vm.obj.contractId != contractIdBeforeSave) {
|
||||
//there may be others which is why I'm doing it this way with the extra variable
|
||||
forceFullRefresh = true;
|
||||
}
|
||||
|
||||
if (forceFullRefresh) {
|
||||
await vm.getDataFromApi(vm.$route.params.recordid);
|
||||
} else {
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false,
|
||||
valid: true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
@@ -644,8 +658,6 @@ async function saveHeader(vm) {
|
||||
|
||||
//}
|
||||
} else {
|
||||
|
||||
|
||||
//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
|
||||
//as undefined won't
|
||||
console.log("Header save, return data is: ", res.data);
|
||||
|
||||
Reference in New Issue
Block a user