This commit is contained in:
@@ -227,7 +227,7 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
|
|
||||||
CURRENTLY DOING: make from new
|
CURRENTLY DOING: make from new
|
||||||
current issues:
|
current issues:
|
||||||
setAllRights is also setting menu so created code is calling set menu too, hmm...
|
|
||||||
|
|
||||||
islockedatserver may be wonky in some cases, before it assumed that an edit could take place if islockedatserver but not anymore
|
islockedatserver may be wonky in some cases, before it assumed that an edit could take place if islockedatserver but not anymore
|
||||||
however the new plan is only op possible when islockedatserver is to change status so need to check schedusers and woitems for that bit
|
however the new plan is only op possible when islockedatserver is to change status so need to check schedusers and woitems for that bit
|
||||||
|
|||||||
@@ -435,6 +435,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//############# DELETE GRAPH ###############
|
//############# DELETE GRAPH ###############
|
||||||
|
//NOTE: Plan is delete from bottom up
|
||||||
//SCHEDULED USERS
|
//SCHEDULED USERS
|
||||||
if (noProblem) {
|
if (noProblem) {
|
||||||
noProblem = await deleteScheduledUsers(vm);
|
noProblem = await deleteScheduledUsers(vm);
|
||||||
@@ -448,6 +449,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//############ SAVE GRAPH ###############
|
//############ SAVE GRAPH ###############
|
||||||
|
//NOTE: Plan is save from top down
|
||||||
//HEADER
|
//HEADER
|
||||||
if (noProblem && !headerSaved) {
|
if (noProblem && !headerSaved) {
|
||||||
noProblem = await saveHeader(vm);
|
noProblem = await saveHeader(vm);
|
||||||
@@ -468,7 +470,6 @@ export default {
|
|||||||
|
|
||||||
//## ALL PARTIAL UPDATES SUCCEEDED
|
//## ALL PARTIAL UPDATES SUCCEEDED
|
||||||
if (!noProblem) {
|
if (!noProblem) {
|
||||||
console.error("noProblem is not true, error!");
|
|
||||||
//this assumes error is already displayed from save op
|
//this assumes error is already displayed from save op
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -494,36 +495,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Nav to this again if it's a post
|
|
||||||
|
|
||||||
// let res = await window.$gz.api.upsert(url, vm.obj);
|
|
||||||
|
|
||||||
// if (res.error) {
|
|
||||||
// vm.formState.serverError = res.error;
|
|
||||||
// window.$gz.form.setErrorBoxErrors(vm);
|
|
||||||
// } else {
|
|
||||||
// //Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
|
|
||||||
// if (res.data.id) {
|
|
||||||
// //POST - whole new object returned
|
|
||||||
// vm.obj = res.data;
|
|
||||||
// //Change URL to new record
|
|
||||||
// //NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
|
|
||||||
|
|
||||||
// this.$router.push({
|
|
||||||
// name: "workorder-edit",
|
|
||||||
// params: {
|
|
||||||
// recordid: res.data.id,
|
|
||||||
// obj: res.data // Pass data object to new form
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// //PUT - only concurrency token is returned (**warning, if server changes object other fields then this needs to act more like POST above but is more efficient this way**)
|
|
||||||
// //Handle "put" of an existing record (UPDATE)
|
|
||||||
// vm.obj.concurrency = res.data.concurrency;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user