This commit is contained in:
@@ -213,7 +213,9 @@ todo: many biz objects are not using new PUT methodology
|
||||
|
||||
|
||||
CURRENTLY DOING: workorder front POC
|
||||
- make minimal front end enough for POC wokorder->woitem->woitemscheduleduser collection (STATE?)
|
||||
- make minimal front end enough for POC wokorder->
|
||||
woitem->woitemscheduleduser collection
|
||||
wostate
|
||||
- test out, confirm can CRUD as planned independantly and all at once
|
||||
- will need some dirty fields and viz fields likely added to models so go minimal route as possible to POC it
|
||||
- NEED editable field at every level to test out the updating and partial updating process
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<div>
|
||||
<template v-if="canAdd">
|
||||
<h5>editable state here</h5>
|
||||
{{ lastState }}
|
||||
<h6>{{ lastState }}</h6>
|
||||
{{ pvm.selectLists.wostatus }}
|
||||
</template>
|
||||
<template v-else>
|
||||
<h5>read only state here</h5>
|
||||
@@ -15,7 +16,15 @@
|
||||
<!--
|
||||
Display as drop down box set to last status entered, user selects new status and it appends a new record to the wostate collection
|
||||
and shows dirty and as new state.
|
||||
Also a button to show more info which pops up a dialog showing the entire state history in a data table -->
|
||||
Also a button to show more info which pops up a dialog showing the entire state history in a data table
|
||||
|
||||
TODO: POC for now don't worry about rights to unset / set certain states, just hook it up for testing
|
||||
todo: show completing states with a checkmark icon, show locking states with a lock icon
|
||||
todo: show states in color as selected (but in some way that is contrasting to avoid invisibility)
|
||||
todo: show current state separate from selection box, selection box only shows available to user states
|
||||
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"
|
||||
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -187,6 +187,9 @@ export default {
|
||||
rights: window.$gz.role.defaultRightsObject(), //overall workorder rights, supersedes subrights
|
||||
ayaType: window.$gz.type.WorkOrder,
|
||||
selectedItemIndex: null,
|
||||
selectLists: {
|
||||
wostatus: []
|
||||
},
|
||||
subRights: {
|
||||
items: {
|
||||
visible: true,
|
||||
@@ -196,7 +199,7 @@ export default {
|
||||
},
|
||||
states: {
|
||||
visible: true,
|
||||
create: false, //no change, only create it's write only
|
||||
create: true, //no change, only create it's write only
|
||||
delete: true
|
||||
},
|
||||
labors: {
|
||||
@@ -686,6 +689,7 @@ let JUST_DELETED = false;
|
||||
async function initForm(vm) {
|
||||
await fetchTranslatedText(vm);
|
||||
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
||||
await populateSelectionLists(vm);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
@@ -717,4 +721,20 @@ async function fetchTranslatedText(vm) {
|
||||
"WorkOrderItemScheduledUserList"
|
||||
]);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
async function populateSelectionLists(vm) {
|
||||
let res = await window.$gz.api.get("work-order-status/list");
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
//window.$gz.errorHandler.handleFormError(res.error, vm);
|
||||
} else {
|
||||
vm.selectLists.wostatus = res.data;
|
||||
}
|
||||
|
||||
//---------
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user