This commit is contained in:
@@ -346,6 +346,9 @@ CURRENTLY DOING: labors
|
|||||||
and in future Unit change may trigger this as well so make it re-usable
|
and in future Unit change may trigger this as well so make it re-usable
|
||||||
Once this is in place, perhaps don't need the whole contract control stuff anymore since it should just handle it...right?
|
Once this is in place, perhaps don't need the whole contract control stuff anymore since it should just handle it...right?
|
||||||
|
|
||||||
|
todo: address setting - rather than setting it *at* the client automatically shouldn't it set at the server automatically?
|
||||||
|
this would remove some weight from the client and with a forcefullrefresh system in place that will help with this as well.
|
||||||
|
|
||||||
todo: check contract expiry for applying!!
|
todo: check contract expiry for applying!!
|
||||||
|
|
||||||
todo: Test back end correctly sets contract on new wo and correctly sets response time (complete by date) on NEW workorder
|
todo: Test back end correctly sets contract on new wo and correctly sets response time (complete by date) on NEW workorder
|
||||||
|
|||||||
@@ -451,6 +451,10 @@ export default {
|
|||||||
|
|
||||||
const isPost = vm.obj.id == 0;
|
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
|
//reset error object
|
||||||
this.saveResult.fatal = false;
|
this.saveResult.fatal = false;
|
||||||
this.saveResult.errors = null;
|
this.saveResult.errors = null;
|
||||||
@@ -519,11 +523,21 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
window.$gz.form.setFormState({
|
//check if full refresh is necessary
|
||||||
vm: vm,
|
if (vm.obj.contractId != contractIdBeforeSave) {
|
||||||
dirty: false,
|
//there may be others which is why I'm doing it this way with the extra variable
|
||||||
valid: true
|
forceFullRefresh = true;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
if (forceFullRefresh) {
|
||||||
|
await vm.getDataFromApi(vm.$route.params.recordid);
|
||||||
|
} else {
|
||||||
|
window.$gz.form.setFormState({
|
||||||
|
vm: vm,
|
||||||
|
dirty: false,
|
||||||
|
valid: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@@ -644,8 +658,6 @@ async function saveHeader(vm) {
|
|||||||
|
|
||||||
//}
|
//}
|
||||||
} else {
|
} 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
|
//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
|
//as undefined won't
|
||||||
console.log("Header save, return data is: ", res.data);
|
console.log("Header save, return data is: ", res.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user