From 983c24a726882f7229df528d76abdc599d3cca5b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 7 Jun 2020 18:13:56 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 ---- ayanova/src/api/ayatype.js | 8 +++++-- ayanova/src/api/gzmenu.js | 24 +++++++++++++++++-- ayanova/src/views/adm-global-settings.vue | 4 +++- ayanova/src/views/adm-license.vue | 4 +++- ayanova/src/views/adm-statistics.vue | 4 +++- ayanova/src/views/ay-customize.vue | 5 ++-- .../src/views/home-notify-subscriptions.vue | 4 +++- ayanova/src/views/home-password.vue | 4 +++- ayanova/src/views/home-user-settings.vue | 1 - ayanova/src/views/ops-backup.vue | 4 +++- ayanova/src/views/ops-jobs.vue | 4 +++- ayanova/src/views/ops-log.vue | 4 +++- ayanova/src/views/ops-metrics.vue | 4 +++- .../src/views/ops-notification-settings.vue | 4 +++- ayanova/src/views/ops-profile.vue | 4 +++- ayanova/src/views/ops-server-state.vue | 4 +++- 17 files changed, 67 insertions(+), 23 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 04aa142d..a0bca115 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -7,10 +7,6 @@ WIFI change 5g channel to 52,56,60 and 2g channel to 8 -todo: readonly not enough, sb disabled as well, check widget and anywhere readonly is set and examine to see if that's a good change -todo: if widget is readonly customize still shows - it's read only (but looks enabled) - should it even show as a menu option? (probably not) todo: PickList, hide open button if disabled and show an active button so user can still click, that's not restricted when readonly todo: Administration - License diff --git a/ayanova/src/api/ayatype.js b/ayanova/src/api/ayatype.js index c8e3cf39..4d792566 100644 --- a/ayanova/src/api/ayatype.js +++ b/ayanova/src/api/ayatype.js @@ -15,7 +15,7 @@ export default { //corebizobject Contract: 10, TrialSeeder: 11, - Metrics: 12, + ServerMetrics: 12, Translation: 13, UserOptions: 14, //corebizobject @@ -81,7 +81,11 @@ export default { WorkOrderTemplate: 45, //corebizobject WorkOrderTemplateItem: 46, - GlobalOps: 47 + GlobalOps: 47, + BizMetrics: 48, + Backup: 49, + Notification: 50, + NotificationSubscription: 51 }; /** * diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index d999efbb..2fad50d9 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -10,6 +10,26 @@ export default { // Deal with a menu change request // called from App.vue handleMenuChange(vm, ctx) { + let UTILITY_TYPES = [ + window.$gz.type.NoType, + window.$gz.type.Global, + window.$gz.type.NoType, + window.$gz.type.ServerState, + window.$gz.type.License, + window.$gz.type.LogFile, + window.$gz.type.ServerJob, + window.$gz.type.TrialSeeder, + window.$gz.type.ServerMetrics, + window.$gz.type.UserOptions, + window.$gz.type.FormCustom, + window.$gz.type.DataListView, + window.$gz.type.GlobalOps, + window.$gz.type.BizMetrics, + window.$gz.type.Backup, + window.$gz.type.Notification, + window.$gz.type.NotificationSubscription + ]; + vm.appBar.isMain = ctx.isMain; vm.appBar.icon = ctx.icon; vm.appBar.title = ctx.title; @@ -89,7 +109,7 @@ export default { } //PLUGINS - for anything with a type but not necessarily an ID - if (formAyaType != 0) { + if (!UTILITY_TYPES.includes(formAyaType)) { vm.appBar.menuItems.push({ title: window.$gz.translation.get("More"), icon: "fa-puzzle-piece", @@ -138,7 +158,7 @@ export default { //SEARCH //all forms except the search form - if (!ctx.hideSearch) { + if (!ctx.hideSearch && !UTILITY_TYPES.includes(formAyaType)) { //For all forms but not on the search form itself; if this is necessary for others then make a nosearch or something flag controlled by incoming ctx but if not then this should suffice vm.appBar.menuItems.push({ title: window.$gz.translation.get("Search"), diff --git a/ayanova/src/views/adm-global-settings.vue b/ayanova/src/views/adm-global-settings.vue index d98a76f3..156e21fa 100644 --- a/ayanova/src/views/adm-global-settings.vue +++ b/ayanova/src/views/adm-global-settings.vue @@ -23,7 +23,9 @@ export default { icon: "fa-cogs", title: this.$ay.t("AdministrationGlobalSettings"), helpUrl: "form-adm-global-settings", - hideSearch: true + formData: { + ayaType: window.$gz.type.Global + } }); }, created() { diff --git a/ayanova/src/views/adm-license.vue b/ayanova/src/views/adm-license.vue index 0bc6b666..c712a8d6 100644 --- a/ayanova/src/views/adm-license.vue +++ b/ayanova/src/views/adm-license.vue @@ -15,7 +15,9 @@ export default { icon: "fa-ticket-alt", title: this.$ay.t("HelpLicense"), helpUrl: "form-adm-license", - hideSearch: true + formData: { + ayaType: window.$gz.type.License + } }); } }; diff --git a/ayanova/src/views/adm-statistics.vue b/ayanova/src/views/adm-statistics.vue index 646986f2..15765f87 100644 --- a/ayanova/src/views/adm-statistics.vue +++ b/ayanova/src/views/adm-statistics.vue @@ -15,7 +15,9 @@ export default { icon: "fa-chart-line", title: this.$ay.t("Statistics"), helpUrl: "form-adm-statistics", - hideSearch: true + formData: { + ayaType: window.$gz.type.BizMetrics + } }); } }; diff --git a/ayanova/src/views/ay-customize.vue b/ayanova/src/views/ay-customize.vue index 130aa951..adb681e2 100644 --- a/ayanova/src/views/ay-customize.vue +++ b/ayanova/src/views/ay-customize.vue @@ -19,7 +19,7 @@ :readonly="formState.readOnly" :label="$ay.t('FormFieldVisible')" :ref="item.key" - :disabled="item.stockRequired" + :disabled="item.stockRequired || formState.readOnly" @change="visibleChanged(item)" :data-cy="!!$ay.dev ? item.key + 'Visible' : false" > @@ -27,13 +27,14 @@ v-model="item.required" :readonly="formState.readOnly" :label="$ay.t('FormFieldEntryRequired')" - :disabled="requiredDisabled(item)" + :disabled="requiredDisabled(item) || formState.readOnly" @change="requiredChanged(item)" >