This commit is contained in:
2021-04-03 14:29:18 +00:00
parent 6c05a8765a
commit 58af118e13
3 changed files with 47 additions and 3 deletions

View File

@@ -55,6 +55,8 @@ todo: v8 migrate additions
## CLIENT MISC ITEMS
todo: generateMenu called on forms redundantly?
called for getdata, but also called in created in wrong place i.e. always rather than just when it's not a getdata situation due to already existing
todo: select list templates under global is offering types that don't6 have select lists like memo etc
todo: if all custom fields are turned off then should not show anything (I think that's already the case but confirm)
todo: ability to turn off attachments for every form it's on via customize ui

View File

@@ -1,5 +1,8 @@
<template>
<div v-if="pvm != null">
<!-- implement the "four states" here -->
<!-- HIDDEN, EMPTY, SINGLE, MULTIPLE -->
<h5 class="ml-12">WorkOrderItemScheduledUsers</h5>
<div v-if="pvm.hasSelectedWoItem">
{{ value.items[pvm.selectedItemIndex].scheduledUsers }}

View File

@@ -65,6 +65,10 @@ export default {
if (this.$route.params.obj) {
//yes, no need to fetch it
this.obj = this.$route.params.obj;
//preset object so do things normally done in getdata
generateMenu(vm);
//update which areas are available to user
setAvailableSectionsFlags(vm);
window.$gz.form.setFormState({
vm: vm,
loading: false
@@ -84,8 +88,6 @@ export default {
valid: true
});
generateMenu(vm);
if (vm.obj.items.length > 0) {
vm.selectedItemIndex = 0;
} else {
@@ -183,7 +185,19 @@ export default {
},
rights: window.$gz.role.defaultRightsObject(),
ayaType: window.$gz.type.WorkOrder,
selectedItemIndex: null
selectedItemIndex: null,
availableSections: {
labors: true,
parts: true,
partRequests: true,
expenses: true,
loans: true,
scheduledUsers: true,
tasks: true,
travels: true,
units: true,
outsideServices: true
}
};
},
//WATCHERS
@@ -282,6 +296,9 @@ export default {
vm.obj = res.data;
//modify the menu as necessary
generateMenu(vm);
//update which areas are available to user
setAvailableSectionsFlags(vm);
//Update the form status
window.$gz.form.setFormState({
vm: vm,
@@ -439,6 +456,28 @@ export default {
}
};
/////////////////////////////
//
//
function setAvailableSectionsFlags(vm) {
//determine which sections are hidden due to form customized out or rights / roles / state
//todo: determine this and set accordingly, for now all set to available true:
/*
availableSections: {
labors: true,
parts: true,
partRequests: true,
expenses: true,
loans: true,
scheduledUsers: true,
tasks: true,
travels: true,
units: true,
outsideServices: true
}
*/
}
/////////////////////////////
//
//