From 2db66a7b77cded8249ccfbd78a3cf692d72fb062 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 19 Aug 2021 23:01:49 +0000 Subject: [PATCH] --- ayanova/src/views/svc-meter-reading.vue | 69 +++++++++++-------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/ayanova/src/views/svc-meter-reading.vue b/ayanova/src/views/svc-meter-reading.vue index 94815e6c..fbda00d0 100644 --- a/ayanova/src/views/svc-meter-reading.vue +++ b/ayanova/src/views/svc-meter-reading.vue @@ -10,18 +10,28 @@ - + + + - - - - - - - - @@ -77,7 +64,7 @@ export default { try { await initForm(vm); - vm.rights = window.$gz.role.getRights(window.$gz.type.CustomerNote); + vm.rights = window.$gz.role.getRights(window.$gz.type.UnitMeterReading); vm.formState.readOnly = !vm.rights.change; window.$gz.eventBus.$on("menu-click", clickHandler); //id 0 means create or duplicate to new @@ -153,7 +140,7 @@ export default { //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, - description: null, + notes: null, meter: 0, meterDate: window.$gz.locale.nowUTC8601String(), unitId: undefined, @@ -170,7 +157,7 @@ export default { serverError: {} }, rights: window.$gz.role.defaultRightsObject(), - ayaType: window.$gz.type.CustomerNote + ayaType: window.$gz.type.UnitMeterReading }; }, //WATCHERS @@ -397,13 +384,16 @@ async function clickHandler(menuItem) { //last report selected is in m.id m.vm.$router.push({ name: "ay-report", - params: { recordid: m.id, ayatype: window.$gz.type.CustomerNote } + params: { + recordid: m.id, + ayatype: window.$gz.type.UnitMeterReading + } }); } else { //general report selector chosen let res = await m.vm.$refs.reportSelector.open({ - AType: window.$gz.type.CustomerNote, + AType: window.$gz.type.UnitMeterReading, selectedRowIds: [m.vm.obj.id] }); @@ -418,7 +408,10 @@ async function clickHandler(menuItem) { //Now open the report viewer... m.vm.$router.push({ name: "ay-report", - params: { recordid: res.id, ayatype: window.$gz.type.CustomerNote } + params: { + recordid: res.id, + ayatype: window.$gz.type.UnitMeterReading + } }); } break; @@ -439,10 +432,10 @@ function generateMenu(vm) { isMain: false, readOnly: vm.formState.readOnly, icon: "$ayiClipboard", - title: "CustomerNoteNotes", + title: "UnitMeterReadingNotes", helpUrl: "customer-notes", formData: { - ayaType: window.$gz.type.CustomerNote, + ayaType: window.$gz.type.UnitMeterReading, recordId: vm.$route.params.recordid }, menuItems: [] @@ -517,8 +510,8 @@ async function initForm(vm) { // async function fetchTranslatedText(vm) { await window.$gz.translation.cacheTranslations([ - "CustomerNoteNotes", - "CustomerNoteNoteDate" + "UnitMeterReadingNotes", + "UnitMeterReadingNoteDate" ]); }