This commit is contained in:
@@ -55,6 +55,8 @@ todo: v8 migrate additions
|
|||||||
|
|
||||||
## CLIENT MISC ITEMS
|
## 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: 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: 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
|
todo: ability to turn off attachments for every form it's on via customize ui
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="pvm != null">
|
<div v-if="pvm != null">
|
||||||
|
<!-- implement the "four states" here -->
|
||||||
|
<!-- HIDDEN, EMPTY, SINGLE, MULTIPLE -->
|
||||||
|
|
||||||
<h5 class="ml-12">WorkOrderItemScheduledUsers</h5>
|
<h5 class="ml-12">WorkOrderItemScheduledUsers</h5>
|
||||||
<div v-if="pvm.hasSelectedWoItem">
|
<div v-if="pvm.hasSelectedWoItem">
|
||||||
{{ value.items[pvm.selectedItemIndex].scheduledUsers }}
|
{{ value.items[pvm.selectedItemIndex].scheduledUsers }}
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ export default {
|
|||||||
if (this.$route.params.obj) {
|
if (this.$route.params.obj) {
|
||||||
//yes, no need to fetch it
|
//yes, no need to fetch it
|
||||||
this.obj = this.$route.params.obj;
|
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({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
loading: false
|
loading: false
|
||||||
@@ -84,8 +88,6 @@ export default {
|
|||||||
valid: true
|
valid: true
|
||||||
});
|
});
|
||||||
|
|
||||||
generateMenu(vm);
|
|
||||||
|
|
||||||
if (vm.obj.items.length > 0) {
|
if (vm.obj.items.length > 0) {
|
||||||
vm.selectedItemIndex = 0;
|
vm.selectedItemIndex = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -183,7 +185,19 @@ export default {
|
|||||||
},
|
},
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayaType: window.$gz.type.WorkOrder,
|
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
|
//WATCHERS
|
||||||
@@ -282,6 +296,9 @@ export default {
|
|||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
//modify the menu as necessary
|
//modify the menu as necessary
|
||||||
generateMenu(vm);
|
generateMenu(vm);
|
||||||
|
//update which areas are available to user
|
||||||
|
setAvailableSectionsFlags(vm);
|
||||||
|
|
||||||
//Update the form status
|
//Update the form status
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
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
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user