From ffef3880d34ebc12a4e97ae08751d3dd27d95a9b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 6 Jun 2020 23:25:11 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 ++++ ayanova/src/components/currency-control.vue | 2 ++ .../src/components/custom-fields-control.vue | 9 +++++++++ ayanova/src/components/pick-list.vue | 2 ++ ayanova/src/views/widget.vue | 20 +++++++++++++++---- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 4b9924fc..04aa142d 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -8,6 +8,10 @@ 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 - view diff --git a/ayanova/src/components/currency-control.vue b/ayanova/src/components/currency-control.vue index 6dbcfb52..f132e8e2 100644 --- a/ayanova/src/components/currency-control.vue +++ b/ayanova/src/components/currency-control.vue @@ -9,6 +9,7 @@ locale: languageName }" :readonly="readonly" + :disabled="disabled" :label="label" :rules="rules" > @@ -41,6 +42,7 @@ export default { rules: Array, value: { type: Number, default: null }, readonly: { type: Boolean, default: false }, + disabled: { type: Boolean, default: false }, error: { type: String, required: false diff --git a/ayanova/src/components/custom-fields-control.vue b/ayanova/src/components/custom-fields-control.vue index 8e95ca5d..d2029194 100644 --- a/ayanova/src/components/custom-fields-control.vue +++ b/ayanova/src/components/custom-fields-control.vue @@ -20,6 +20,7 @@ @@ -48,6 +50,7 @@ @@ -222,6 +235,7 @@ > { vm.rights = window.$gz.role.getRights(window.$gz.type.Widget); - + vm.formState.readOnly = !vm.rights.change; window.$gz.eventBus.$on("menu-click", clickHandler); //id 0 means create a new record don't load one if (vm.$route.params.recordid != 0) { vm.getDataFromApi(vm.$route.params.recordid); } else { //setup for new record - let readOnly = !vm.rights.change; //Update the form status window.$gz.form.setFormState({ vm: vm, dirty: false, valid: true, - loading: false, - readOnly: readOnly + loading: false }); // //bugbug WTF? This doesn't make sense, if it's an attempt to hide delete button then that's wrong