This commit is contained in:
@@ -419,7 +419,16 @@ export default {
|
|||||||
//mostly via workorderitem
|
//mostly via workorderitem
|
||||||
//########################################################
|
//########################################################
|
||||||
let noProblem = true;
|
let noProblem = true;
|
||||||
let isNew = this.obj.concurrency == 0;
|
|
||||||
|
//HEADER MUST BE SAVED FIRST IF IT's NEW
|
||||||
|
//(otherwise there's nothing to hang the other things off of)
|
||||||
|
let headerSaved = false;
|
||||||
|
if (this.obj.concurrency == 0) {
|
||||||
|
console.log("concurrency 0, saving header");
|
||||||
|
|
||||||
|
noProblem = await saveHeader(vm);
|
||||||
|
headerSaved = true;
|
||||||
|
}
|
||||||
|
|
||||||
//### STATE first if unlocking only
|
//### STATE first if unlocking only
|
||||||
//if moving to another locked state this will block further updates below but we're accepting that
|
//if moving to another locked state this will block further updates below but we're accepting that
|
||||||
@@ -445,7 +454,7 @@ export default {
|
|||||||
|
|
||||||
//############ SAVE GRAPH ###############
|
//############ SAVE GRAPH ###############
|
||||||
//HEADER
|
//HEADER
|
||||||
if (noProblem) {
|
if (noProblem && !headerSaved) {
|
||||||
noProblem = await saveHeader(vm);
|
noProblem = await saveHeader(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,6 +619,7 @@ async function saveHeader(vm) {
|
|||||||
}
|
}
|
||||||
let isPost = o.id == 0;
|
let isPost = o.id == 0;
|
||||||
let res = await window.$gz.api.upsert(`${API_BASE_URL}`, o);
|
let res = await window.$gz.api.upsert(`${API_BASE_URL}`, o);
|
||||||
|
console.log("result of saving header is ", res);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
displayResError(vm, res);
|
displayResError(vm, res);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user