From 081d21ff98d2086bbf48b2175e14bad262580494 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 24 Dec 2020 18:19:23 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 12 ++++++------ ayanova/src/api/gzmenu.js | 17 +++++++++++++++-- ayanova/src/views/adm-translation.vue | 3 ++- ayanova/src/views/adm-user.vue | 3 ++- ayanova/src/views/ay-data-list-view.vue | 3 ++- ayanova/src/views/ay-report-edit.vue | 3 ++- ayanova/src/views/cust-customer.vue | 3 ++- ayanova/src/views/cust-head-office.vue | 3 ++- ayanova/src/views/cust-user.vue | 3 ++- ayanova/src/views/svc-project.vue | 3 ++- ayanova/src/views/vendor.vue | 3 ++- ayanova/src/views/widget.vue | 3 ++- 12 files changed, 41 insertions(+), 18 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index cf531762..c71ef165 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -5,16 +5,16 @@ MISC ITEMS THAT CAME UP -todo: newer objects use full translation key for form field definitions but some forms have abbreviated or lower case for ShowMe() code, double check recent -todo: grid list filter needs to have a single button to reset / clear to default because things like review will always be having their filters set - by the most recent op + todo: NEXT DEPLOY TO DEVOPS attach a photo from phone, no error just does nothing worked here locally latest build retest on server after next deploy -todo: CustomerList filter *noVALUE* on business phone returns zero results even though it's got some missing business phones - maybe it's looking for null specifically at server and not just an empty string for text ones? -todo: get rid of db warning from context setname code that is deprecated and keeps showing in log on boot + +todo: v8 MIGRATE do not export empty strings, do null instead + confirm whatever method I use works for certain + todo: if the Name field could be in the page title then bookmarking a customer for example would show the customer name in the bookmark + todo: dumb idea: have all date fields in grid display a color based on their relative age unless already a color column past = grayer and grayer to a max value diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index ef03f4b8..2ef211a0 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -52,11 +52,24 @@ export default { } else { vm.appBar.color = ctx.isMain ? "primary" : "secondary"; } + let recordName = ""; + if (ctx && ctx.formData && ctx.formData.recordName) { + recordName = ctx.formData.recordName; + } + let hasRecordName = recordName != ""; if (ctx.title) { - document.title = "AyaNova " + vm.$ay.t(ctx.title); + if (hasRecordName) { + document.title = `${recordName} - ${vm.$ay.t(ctx.title)} AyaNova `; + } else { + document.title = `${vm.$ay.t(ctx.title)} ${recordName}`; + } } else { - document.title = "AyaNova"; + if (hasRecordName) { + document.title = `${recordName} AyaNova`; + } else { + document.title = "AyaNova"; + } } //Parse the formdata if present diff --git a/ayanova/src/views/adm-translation.vue b/ayanova/src/views/adm-translation.vue index bbfe32ef..8ee46ee9 100644 --- a/ayanova/src/views/adm-translation.vue +++ b/ayanova/src/views/adm-translation.vue @@ -576,7 +576,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.Translation, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/adm-user.vue b/ayanova/src/views/adm-user.vue index 931d0629..d7fa5b6f 100644 --- a/ayanova/src/views/adm-user.vue +++ b/ayanova/src/views/adm-user.vue @@ -958,7 +958,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.User, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index 73066da6..123a9eed 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -930,7 +930,8 @@ function generateMenu(vm) { helpUrl: "form-ay-data-list-view", formData: { ayaType: window.$gz.type.FormCustom, - formCustomTemplateKey: undefined + formCustomTemplateKey: undefined, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/ay-report-edit.vue b/ayanova/src/views/ay-report-edit.vue index 3aecc77e..77c22670 100644 --- a/ayanova/src/views/ay-report-edit.vue +++ b/ayanova/src/views/ay-report-edit.vue @@ -1016,7 +1016,8 @@ function generateMenu(vm) { helpUrl: "form-ay-report-edit", formData: { ayaType: window.$gz.type.Report, - recordId: vm.$route.params.recordid + recordId: vm.$route.params.recordid, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 089577bc..814e1326 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -1410,7 +1410,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.Customer, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/cust-head-office.vue b/ayanova/src/views/cust-head-office.vue index 9d2916e9..d3324af6 100644 --- a/ayanova/src/views/cust-head-office.vue +++ b/ayanova/src/views/cust-head-office.vue @@ -1307,7 +1307,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.HeadOffice, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/cust-user.vue b/ayanova/src/views/cust-user.vue index e8931e35..60c77647 100644 --- a/ayanova/src/views/cust-user.vue +++ b/ayanova/src/views/cust-user.vue @@ -967,7 +967,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.User, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/svc-project.vue b/ayanova/src/views/svc-project.vue index 927bb938..a0df2984 100644 --- a/ayanova/src/views/svc-project.vue +++ b/ayanova/src/views/svc-project.vue @@ -694,7 +694,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.Project, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/vendor.vue b/ayanova/src/views/vendor.vue index 9a6b5505..80774742 100644 --- a/ayanova/src/views/vendor.vue +++ b/ayanova/src/views/vendor.vue @@ -1115,7 +1115,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.Vendor, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] }; diff --git a/ayanova/src/views/widget.vue b/ayanova/src/views/widget.vue index dccdc9b6..5fac2125 100644 --- a/ayanova/src/views/widget.vue +++ b/ayanova/src/views/widget.vue @@ -665,7 +665,8 @@ function generateMenu(vm) { formData: { ayaType: window.$gz.type.Widget, recordId: vm.$route.params.recordid, - formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY + formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, + recordName: vm.obj.name }, menuItems: [] };