This commit is contained in:
2021-04-06 17:25:10 +00:00
parent acf202a897
commit 7eb993e23f
3 changed files with 38 additions and 7 deletions

View File

@@ -51,7 +51,10 @@
Showing the form below the grid of all the other items is actually a handy affordance because you can see what was entered and refer to it in the companion same group items Showing the form below the grid of all the other items is actually a handy affordance because you can see what was entered and refer to it in the companion same group items
so if you forgot if you entered a particular user or not in the midst of entry you can see it just above so if you forgot if you entered a particular user or not in the midst of entry you can see it just above
todo: can I turn control labels into hyperlinks for getting to feeder records? If not then need to find a way to accomplish it
e.g. can workorder status title be changed to a hyper link to status list
e.g. can projects title be turned to a hyper link to projects list
ideally not in menu because it would be a lot on a workorder and need space for wo graph subitem links
todo: need to implement layered (ordered) save now so can test todo: need to implement layered (ordered) save now so can test
todo: need an editable control at every level for proper test of partical update todo: need an editable control at every level for proper test of partical update
todo: need the state control at least enough to test as it's a critical part todo: need the state control at least enough to test as it's a critical part

View File

@@ -68,6 +68,7 @@
todo: it must be clear to user why they can not change if they have too low a role to change, perhaps text under state instead of selector box that says "Only select roles can change this state" todo: it must be clear to user why they can not change if they have too low a role to change, perhaps text under state instead of selector box that says "Only select roles can change this state"
--> -->
{{ currentState }}
</div> </div>
</template> </template>
<script> <script>
@@ -147,11 +148,39 @@ export default {
}; };
}, },
canAdd: function() { canAdd: function() {
return ( //first check most obvious disqualifying properties
!this.value.isLocked && if (!this.pvm.rights.change || !this.pvm.subRights.states.create) {
this.pvm.rights.change && return false;
this.pvm.subRights.states.create }
);
//not currently locked, user has rights to do it so allow it
if (!this.value.isLocked) {
return true;
}
//locked, confirm if user can change it
//if any role then no problem
//ok, only thing left to check is if the current user can unlock this
//get remove roles required for current state
let cs = this.currentState;
if (cs.removeRoles == null || cs.removeRoles == 0) {
//no state set yet
return true;
}
//ok, need to check the role here against current user roles to see if this is valid
if (window.$gz.role.hasRole(cs.removeRoles)) {
return true;
}
//failsafe
return false;
// return (
// !this.value.isLocked &&
// this.pvm.rights.change &&
// this.pvm.subRights.states.create
// );
} }
} }
}; };

View File

@@ -455,7 +455,6 @@ export default {
// vm.obj.concurrency = res.data.concurrency; // vm.obj.concurrency = res.data.concurrency;
// } // }
// } // }
} catch (ex) { } catch (ex) {
window.$gz.errorHandler.handleFormError(ex, vm); window.$gz.errorHandler.handleFormError(ex, vm);