diff --git a/ayanova/src/api/open-object-handler.js b/ayanova/src/api/open-object-handler.js index 9e1380cf..d989dbd0 100644 --- a/ayanova/src/api/open-object-handler.js +++ b/ayanova/src/api/open-object-handler.js @@ -15,6 +15,12 @@ export default { if (tid.type && tid.id != null) { switch (tid.type) { + case ayatype.Customer: + vm.$router.push({ + name: "customer-edit", + params: { recordid: tid.id } + }); + break; case ayatype.Widget: vm.$router.push({ name: "widget-edit", diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 24c99df0..388cf4a8 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -325,26 +325,47 @@ export default { selectLists: { usertypes: [] }, - obj: { + obj: //IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record //I.E. Serial, usertype fields //Also, if it's a non-nullable Enum backed field then it should have a valid selection i.e. not zero if there is no zero - id: 0, - concurrency: 0, - name: null, - serial: 0, - dollarAmount: null, - active: null, - userType: 2, //defaulted here to something valid - startDate: null, - endDate: null, - notes: null, - count: null, - wiki: null, - customFields: "{}", - tags: [], - userId: null - }, + { + id: 0, + concurrency: 0, + name: null, + active: null, + notes: null, + wiki: null, + customFields: "{}", + tags: [], + webAddress: null, + popUpNotes: null, + billHeadOffice: false, + headOfficeID: null, + techNotes: null, + accountNumber: null, + usesBanking: false, + contractID: null, + contractExpires: null, + defaultServiceTemplateID: null, + phone1: null, + phone2: null, + phone3: null, + phone4: null, + phone5: null, + emailAddress: null, + postAddress: null, + postCity: null, + postRegion: null, + postCountry: null, + postCode: null, + address: null, + city: null, + region: null, + country: null, + latitude: null, + longitude: null + }, formState: { ready: false, dirty: false,