diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 9bd1c53b..4bfa7c6a 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -45,11 +45,6 @@ CURRENT TODOs @@@@@@@@@@@ ROADMAP STAGE 1 and 2: -todo: widget edit, NEW button? (v7 has a new button for every type of record?? Save and new??) - -todo: apparently I can change the buttons to display the text not uppercase with class="text-none" or something, should I go back to buttons? (kinda looked cooler, but...) - - https://github.com/vuetifyjs/vuetify/issues/3948 - todo: Customize form - needs locale text customization link in there too because that's the central spot people go to do that shit - Locale on it's own form though as previously planned, just additional link on customize fields form so that people can ramble their way onto it. diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index e4bfd948..5a06ebb2 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -91,8 +91,12 @@ export default { if ( ctx.formData && ctx.formData.formCustomTemplateKey != undefined && - window.$gz.role.hasRole(window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull) + window.$gz.role.hasRole([ + window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull, + window.$gz.role.AUTHORIZATION_ROLES.BizAdminLimited + ]) ) { + //NOTE: BizAdminFull can edit, bizadminlimited can read only //add customize menu item //DIVIDER //Insert the devider between context and global items diff --git a/ayanova/src/views/ay-customize.vue b/ayanova/src/views/ay-customize.vue index 16e47d14..190769ec 100644 --- a/ayanova/src/views/ay-customize.vue +++ b/ayanova/src/views/ay-customize.vue @@ -23,7 +23,7 @@ {{ tempTemplate }} --> - + @@ -52,6 +52,7 @@ { vm.formState.ready = true; + vm.readOnly = !vm.rights.change; window.$gz.eventBus.$on("menu-click", clickHandler); //NOTE: this would normally be in getDataFromAPI but this form doesn't really need that function so doing it here //modify the menu as necessary @@ -178,23 +182,23 @@ export default { }, submit() { var vm = this; - var url = API_BASE_URL + this.formCustomTemplateKey; + var url = API_BASE_URL + vm.formCustomTemplateKey; //clear any errors vm might be around from previous submit - window.$gz.form.deleteAllErrorBoxErrors(this); + window.$gz.form.deleteAllErrorBoxErrors(vm); //Create template data object here.... //Note that server expects to see a string array of json template, not actual json var newObj = { - formKey: this.formCustomTemplateKey, - concurrencyToken: this.concurrencyToken, + formKey: vm.formCustomTemplateKey, + concurrencyToken: vm.concurrencyToken, template: "[]" }; //temporary array to hold template for later stringification var temp = []; //Rules: - for (var i = 0; i < this.obj.length; i++) { - var fldItem = this.obj[i]; + for (var i = 0; i < vm.obj.length; i++) { + var fldItem = vm.obj[i]; if (fldItem.custom == false) { //Process regular stock field //If it's *not* set to stockRequired (i.e. built in field with biz rules that can't be hidden or changed)