This commit is contained in:
@@ -261,8 +261,8 @@ export default {
|
|||||||
fatal: false, //fatal error, further save is pointless, bail early and report
|
fatal: false, //fatal error, further save is pointless, bail early and report
|
||||||
errors: null //contains error objects from save
|
errors: null //contains error objects from save
|
||||||
},
|
},
|
||||||
lastGetContractId: null,
|
lastGetContractId: -1, //note: -1 so that a new record updates
|
||||||
lastGetCustomerId: null
|
lastGetCustomerId: -1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//WATCHERS
|
//WATCHERS
|
||||||
@@ -411,24 +411,24 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async submitNewContract() {
|
// async submitNewContract() {
|
||||||
//save new contract route, this only ever gets called from a clean wo with no dirty edits so just save the contract and reset the wo from the result
|
// //save new contract route, this only ever gets called from a clean wo with no dirty edits so just save the contract and reset the wo from the result
|
||||||
let res = await window.$gz.api.post(
|
// let res = await window.$gz.api.post(
|
||||||
`${API_BASE_URL}set-contract/${this.obj.id}`,
|
// `${API_BASE_URL}set-contract/${this.obj.id}`,
|
||||||
{ newContractId: this.obj.contractId }
|
// { newContractId: this.obj.contractId }
|
||||||
);
|
// );
|
||||||
if (res.error) {
|
// if (res.error) {
|
||||||
this.formState.serverError = res.error;
|
// this.formState.serverError = res.error;
|
||||||
window.$gz.form.setErrorBoxErrors(this);
|
// window.$gz.form.setErrorBoxErrors(this);
|
||||||
} else {
|
// } else {
|
||||||
this.obj = res.data;
|
// this.obj = res.data;
|
||||||
window.$gz.form.setFormState({
|
// window.$gz.form.setFormState({
|
||||||
vm: this,
|
// vm: this,
|
||||||
dirty: false,
|
// dirty: false,
|
||||||
valid: true
|
// valid: true
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
async submit() {
|
async submit() {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
if (vm.canSave == false) {
|
if (vm.canSave == false) {
|
||||||
@@ -521,8 +521,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "workorder-edit",
|
name: "workorder-edit",
|
||||||
params: {
|
params: {
|
||||||
recordid: vm.obj.id,
|
recordid: vm.obj.id
|
||||||
obj: vm.obj // Pass data object to new form
|
// ,obj: vm.obj // Pass data object to new form
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user