diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index e99cf566..2389dfb6 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -24,6 +24,10 @@ todo: need a role collection control of some kind for things like case 3417. ideally it binds to a single value and can extract back out of that value bitwise all the correct items in the list checked This way can bind it to a single bit field value and be efficient FTW$! + +todo: user options form put color picker last it's pushing down the entire last row + also, can it be shorter, there's probably a setting for that + todo: need to test a license downgrade of techs once have User creation stuff done todo: Administration - translation diff --git a/ayanova/src/api/authorizationroles.js b/ayanova/src/api/authorizationroles.js index c7085ae2..e2b7ffe7 100644 --- a/ayanova/src/api/authorizationroles.js +++ b/ayanova/src/api/authorizationroles.js @@ -112,7 +112,8 @@ export default { let userRole = window.$gz.store.state.roles; //calculate the effective rights - //a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value (contrary to some style guides that say !! is obscure but I say it saves a lot of typing) + //a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value + //(contrary to some style guides that say !! is obscure but I say it saves a lot of typing) let canChange = !!(userRole & objectRoleRights.Change); let canReadFullRecord = !!(userRole & objectRoleRights.ReadFullRecord); diff --git a/ayanova/src/components/role-control.vue b/ayanova/src/components/role-control.vue new file mode 100644 index 00000000..22ec9550 --- /dev/null +++ b/ayanova/src/components/role-control.vue @@ -0,0 +1,76 @@ + + diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 89abacab..1755dd54 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -44,6 +44,7 @@ import dataTable from "./components/gz-data-table.vue"; import customFieldsControl from "./components/custom-fields-control.vue"; import currencyControl from "./components/currency-control.vue"; import decimalControl from "./components/decimal-control.vue"; +import roleControl from "./components/role-control.vue"; import errorControl from "./components/error-control.vue"; import reportSelectorControl from "./components/report-selector-control.vue"; import reportViewerControl from "./components/report-viewer-control.vue"; @@ -183,6 +184,7 @@ Vue.component("gz-data-table", dataTable); Vue.component("gz-custom-fields", customFieldsControl); Vue.component("gz-currency", currencyControl); Vue.component("gz-decimal", decimalControl); +Vue.component("gz-role-picker", roleControl); Vue.component("gz-error", errorControl); Vue.component("gz-report-selector", reportSelectorControl); Vue.component("gz-report-viewer", reportViewerControl); diff --git a/ayanova/src/views/adm-user.vue b/ayanova/src/views/adm-user.vue index 5e3c7b94..80357f48 100644 --- a/ayanova/src/views/adm-user.vue +++ b/ayanova/src/views/adm-user.vue @@ -4,6 +4,7 @@ + todo: set password, maybe set user options? @@ -14,7 +15,7 @@ :clearable="!formState.readOnly" @click:clear="fieldValueChanged('name')" :counter="255" - :label="$ay.t('UserName')" + :label="$ay.t('Name')" :rules="[ form().max255(this, 'name'), form().required(this, 'name') @@ -25,94 +26,39 @@ @input="fieldValueChanged('name')" > - + - - - - - + + ref="roles" + testId="roles" + :error-messages="form().serverErrors(this, 'roles')" + @input="fieldValueChanged('roles')" + > - - - - - - - - - - - - -