This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user