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