This commit is contained in:
@@ -405,13 +405,29 @@ export default {
|
||||
//###############################
|
||||
let fail = false;
|
||||
|
||||
//STATE first
|
||||
if (!fail) await saveState(vm);
|
||||
//STATE first if unlocking only
|
||||
if (this.obj.isLocked) {
|
||||
fail = await saveState(vm);
|
||||
}
|
||||
|
||||
//WOITEMS
|
||||
//if (!fail) await saveState(vm);
|
||||
|
||||
//## UPDATE DIRTY HERE FOR WHOLE WO
|
||||
//HEADER
|
||||
|
||||
//STATE last normally in case it locks
|
||||
//or is completed
|
||||
if (!this.obj.isLocked) {
|
||||
fail = await saveState(vm);
|
||||
}
|
||||
|
||||
//## ALL PARTIAL UPDATES SUCCEEDED
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false,
|
||||
valid: true
|
||||
});
|
||||
|
||||
//TODO: Nav to this again if it's a post
|
||||
|
||||
// let res = await window.$gz.api.upsert(url, vm.obj);
|
||||
|
||||
@@ -439,13 +455,7 @@ export default {
|
||||
// vm.obj.concurrency = res.data.concurrency;
|
||||
// }
|
||||
|
||||
// //============================================== END ALL UPDATES ==================================================
|
||||
// //Update the form status
|
||||
// window.$gz.form.setFormState({
|
||||
// vm: vm,
|
||||
// dirty: false,
|
||||
// valid: true
|
||||
// });
|
||||
|
||||
// }
|
||||
} catch (ex) {
|
||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||
|
||||
Reference in New Issue
Block a user