From 9a51e8c4e8238f184e834f82e2459ef8cc1db1a2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 30 Apr 2019 23:26:39 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 13 ++++----- ayanova/devdocs/tools.txt | 5 +++- ayanova/src/api/gzform.js | 4 +++ ayanova/src/views/inventory-widget-edit.vue | 29 +++++++++++++++------ 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index e188ceb7..316f4ef7 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -41,12 +41,13 @@ All platforms and browsers - DONE Make about contextual and insert a menu item to view log - DONE WIRE up save menu item and add code to disable save on broken rules (and make red, disabled etc) - DONE Move wire up event code from app.vue to gzmenu and call it from app.vue +### UPDATE VUETIFY, SB 0.5.0, not 0.4.6 ### - RIGHTS in form state so can easily enable / disable etc - INFO - SERVER will return on request of an object one of these: - DONE Not authenticated at all 401 - DONE Redirect to login - - Not authorized for this object 403 (could be due to not own or whatever, we don't care, server handles that shit, client just knows not to show it) + - DONE Not authorized for this object 403 (could be due to not own or whatever, we don't care, server handles that shit, client just knows not to show it) - Object...BUT with READONLY flag of some kind present (in outer wrapper??), so client knows to show read only and not allow editing - And client doesn't need to work out self owned etc - DONE Object without readonly flag present so fully editable!!! WOOT! @@ -57,13 +58,9 @@ All platforms and browsers - WidgetList should check if Own record possible and check the list object for owner ID (maybe all lists will need to provide owner ID's?) - Delete should be checked - CHANGE should be checked - - If no rights then should redirect back to HOME, NOT LOGIN!!! - - user with no rights = SubContractorLimited - - If user attempts to load widget form but has no rights to widget server returns the NO rights code but that is triggering back to login - - Should it do this? Normally would not be an issue because it wouldn't open that form unless they saved or manually typed a link to it - - Technically it's incorrect, they don't have to login, they just can't get that record - - Have a look at why it's redirecting and decide if this is worth a change - - LIST OBJECT RESEARCH / DECISION + - DONE If no rights then should redirect back to HOME, NOT LOGIN!!! + - DONE user with no rights = SubContractorLimited + - TODO LIST OBJECT RESEARCH / DECISION - TODO: ?? DECISION server widget lists and other lists - Either the list should show items with alternate icons to EDIT if they are read only or... - Use a generic OPEN icon and link instead and user doesn't see status until they open it. diff --git a/ayanova/devdocs/tools.txt b/ayanova/devdocs/tools.txt index 920cf14e..fdf814ef 100644 --- a/ayanova/devdocs/tools.txt +++ b/ayanova/devdocs/tools.txt @@ -1,2 +1,5 @@ VUE COMMAND LINE INTERFACE -run vue cli from anywhere \ No newline at end of file +run vue cli from anywhere + +VUE GUI INTERFACE +run vue ui from project folder (or maybe anywhere not sure) \ No newline at end of file diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index bcb1d0b5..b5ce2789 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -497,6 +497,10 @@ export default { if (newState.loading != undefined) { newState.vm.formState.loading = newState.loading; } + + if (newState.readOnly != undefined) { + newState.vm.formState.readOnly = newState.readOnly; + } }); } }; diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index a030400d..30e8128b 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -18,6 +18,7 @@ - @@ -94,6 +100,7 @@