This commit is contained in:
2021-04-02 20:49:34 +00:00
parent b75281ef4a
commit 5ae526dbe2
3 changed files with 14 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
<template>
<div>
<h1>WorkOrder header</h1>
<v-row>
<v-col cols="12" sm="6" lg="4" xl="3" v-if="value.serial != 0">
<template v-if="canEditSerial">

View File

@@ -2,18 +2,20 @@
<div>
<h2>WorkOrder items here</h2>
items:{{ value.items }}<br />
<template v-if="value.items && value.items.length > 0">
<!-- items:{{ value.items }}<br /> -->
selected index: {{ pvm.selectedItemIndex }}
<template v-if="value.items && value.items.length > 1">
<h3>table of woitems here</h3>
itemcount:{{ value.items.length }}
</template>
<template v-if="pvm.selectedItemIndex != null">
selected index: {{ pvm.selectedItemIndex }}
<h4>woitemform here</h4>
<h5 class="ml-5">woitem grandchildren here</h5>
<GzWoItemScheduledUsers data-cy="woItemScheduledUsers" />
</template>
<template v-else>
<h5>select a woitem to view the form</h5>
</template>
</div>
</template>
<script>

View File

@@ -70,7 +70,9 @@ export default {
loading: false
});
} else {
console.log("Fetching wo");
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
console.log("fetched wo");
}
} else {
window.$gz.form.setFormState({
@@ -85,8 +87,11 @@ export default {
});
generateMenu(vm);
if (vm.obj.items.count > 0) {
selectedItemIndex = 0;
console.log("about to select index, vm.obj is", vm.obj);
if (vm.obj.items.length > 0) {
vm.selectedItemIndex = 0;
} else {
vm.selectedItemIndex = null;
}
} catch (error) {
window.$gz.errorHandler.handleFormError(error, vm);