This commit is contained in:
2021-04-12 17:28:26 +00:00
parent e67ff56055
commit f1ca093a49

View File

@@ -68,10 +68,7 @@ export default {
if (this.$route.params.obj) {
//yes, no need to fetch it
this.obj = this.$route.params.obj;
//preset object so do things normally done in getdata
generateMenu(vm);
//update which areas are available to user
setSubRights(vm);
window.$gz.form.setFormState({
vm: vm,
loading: false
@@ -90,6 +87,10 @@ export default {
dirty: false,
valid: true
});
//preset object so do things normally done in getdata
generateMenu(vm);
//update which areas are available to user
setSubRights(vm);
} catch (error) {
window.$gz.errorHandler.handleFormError(error, vm);
} finally {
@@ -114,44 +115,42 @@ export default {
return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
obj: {
data: {
id: 0,
concurrency: 0,
serial: null,
notes: null,
wiki: null,
customFields: "{}",
tags: [],
customerId: null,
projectId: null,
internalReferenceNumber: null,
customerReferenceNumber: null,
customerContactName: null,
fromQuoteId: null,
fromPMId: null,
fromCSRId: null,
serviceDate: null,
completeByDate: null,
invoiceNumber: null,
customerSignature: null,
customerSignatureName: null,
customerSignatureCaptured: null,
postAddress: null,
postCity: null,
postRegion: null,
postCountry: null,
postCode: null,
address: null,
city: null,
region: null,
country: null,
latitude: null,
longitude: null,
items: [],
states: [],
isDirty: false,
isLockedAtServer: false
}
id: 0,
concurrency: 0,
serial: 0,
notes: null,
wiki: null,
customFields: "{}",
tags: [],
customerId: null,
projectId: null,
internalReferenceNumber: null,
customerReferenceNumber: null,
customerContactName: null,
fromQuoteId: null,
fromPMId: null,
fromCSRId: null,
serviceDate: null,
completeByDate: null,
invoiceNumber: null,
customerSignature: null,
customerSignatureName: null,
customerSignatureCaptured: null,
postAddress: null,
postCity: null,
postRegion: null,
postCountry: null,
postCode: null,
address: null,
city: null,
region: null,
country: null,
latitude: null,
longitude: null,
items: [],
states: [],
isDirty: false,
isLockedAtServer: false
},
formState: {
ready: false,