This commit is contained in:
2021-07-26 21:31:37 +00:00
parent db4d8badfe
commit 29cd9e8541
2 changed files with 31 additions and 170 deletions

View File

@@ -1,23 +1,5 @@
<template>
<div v-if="value != null" class="mt-8">
<!-- {{
{
isRestrictedType: value.userIsRestrictedType,
isTechRestricted: value.userIsTechRestricted,
subfull: value.userIsSubContractorFull,
subRestricted: value.userIsSubContractorRestricted,
showLabors: showLabors,
showTravels: showTravels,
showExpenses: showExpenses,
showLoans: showLoans,
showOutsideServices: showOutsideServices,
showParts: showParts,
showPartRequests: showPartRequests,
showScheduledUsers: showScheduledUsers,
showTasks: showTasks,
showUnits: showUnits
}
}} -->
<v-row>
<!-- Title and menu -->
<v-col cols="12">
@@ -545,7 +527,7 @@
############################################################################ -->
<v-col cols="12" v-show="showUnits">
<GzWoItemUnits
<GzQuoteItemUnits
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -556,7 +538,7 @@
</v-col>
<v-col cols="12" v-show="showScheduledUsers">
<GzWoItemScheduledUsers
<GzQuoteItemScheduledUsers
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -566,7 +548,7 @@
/>
</v-col>
<v-col cols="12" v-show="showTasks">
<GzWoItemTasks
<GzQuoteItemTasks
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -577,7 +559,7 @@
</v-col>
<v-col cols="12" v-show="showParts">
<GzWoItemParts
<GzQuoteItemParts
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -587,19 +569,8 @@
/>
</v-col>
<v-col cols="12" v-if="showPartRequests">
<GzWoItemPartRequests
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
:goto-index="gotoPartRequestIndex"
data-cy="woItemPartRequests"
@change="$emit('change')"
/>
</v-col>
<v-col cols="12" v-show="showLabors">
<GzWoItemLabors
<GzQuoteItemLabors
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -609,7 +580,7 @@
/>
</v-col>
<v-col cols="12" v-show="showTravels">
<GzWoItemTravels
<GzQuoteItemTravels
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -619,7 +590,7 @@
/>
</v-col>
<v-col cols="12" v-show="showExpenses">
<GzWoItemExpenses
<GzQuoteItemExpenses
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -630,7 +601,7 @@
</v-col>
<v-col cols="12" v-show="showLoans">
<GzWoItemLoans
<GzQuoteItemLoans
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -640,7 +611,7 @@
/>
</v-col>
<v-col cols="12" v-show="showOutsideServices">
<GzWoItemOutsideServices
<GzQuoteItemOutsideServices
v-model="value"
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
@@ -697,29 +668,27 @@
/* XXXeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
import GzWoItemUnits from "../components/work-order-item-units.vue";
import GzWoItemScheduledUsers from "../components/work-order-item-scheduled-users.vue";
import GzWoItemLabors from "../components/work-order-item-labors.vue";
import GzWoItemTravels from "../components/work-order-item-travels.vue";
import GzWoItemExpenses from "../components/work-order-item-expenses.vue";
import GzWoItemTasks from "../components/work-order-item-tasks.vue";
import GzWoItemParts from "../components/work-order-item-parts.vue";
import GzWoItemPartRequests from "../components/work-order-item-part-requests.vue";
import GzWoItemLoans from "../components/work-order-item-loans.vue";
import GzWoItemOutsideServices from "../components/work-order-item-outside-services.vue";
import GzQuoteItemUnits from "../components/quote-item-units.vue";
import GzQuoteItemScheduledUsers from "../components/quote-item-scheduled-users.vue";
import GzQuoteItemLabors from "../components/quote-item-labors.vue";
import GzQuoteItemTravels from "../components/quote-item-travels.vue";
import GzQuoteItemExpenses from "../components/quote-item-expenses.vue";
import GzQuoteItemTasks from "../components/quote-item-tasks.vue";
import GzQuoteItemParts from "../components/quote-item-parts.vue";
import GzQuoteItemLoans from "../components/quote-item-loans.vue";
import GzQuoteItemOutsideServices from "../components/quote-item-outside-services.vue";
export default {
components: {
GzWoItemUnits,
GzWoItemScheduledUsers,
GzWoItemExpenses,
GzWoItemLabors,
GzWoItemTravels,
GzWoItemTasks,
GzWoItemParts,
GzWoItemPartRequests,
GzWoItemLoans,
GzWoItemOutsideServices
GzQuoteItemUnits,
GzQuoteItemScheduledUsers,
GzQuoteItemExpenses,
GzQuoteItemLabors,
GzQuoteItemTravels,
GzQuoteItemTasks,
GzQuoteItemParts,
GzQuoteItemLoans,
GzQuoteItemOutsideServices
},
created() {
this.setDefaultView();
@@ -733,7 +702,6 @@ export default {
gotoLaborIndex: null,
gotoLoanIndex: null,
gotoPartIndex: null,
gotoPartRequestIndex: null,
gotoTaskIndex: null,
gotoScheduledUserIndex: null,
gotoTravelIndex: null,
@@ -816,15 +784,6 @@ export default {
}
});
break;
case window.$gz.type.WorkOrderItemPartRequest:
z.partRequests.forEach((x, childindex) => {
if (x.id == val.id) {
navto.woitemindex = itemindex;
navto.childindex = childindex;
keepgoing = false;
}
});
break;
case window.$gz.type.WorkOrderItemScheduledUser:
z.scheduledUsers.forEach((x, childindex) => {
if (x.id == val.id) {
@@ -894,9 +853,7 @@ export default {
case window.$gz.type.WorkOrderItemPart:
this.gotoPartIndex = navto.childindex;
break;
case window.$gz.type.WorkOrderItemPartRequest:
this.gotoPartRequestIndex = navto.childindex;
break;
case window.$gz.type.WorkOrderItemTask:
this.gotoTaskIndex = navto.childindex;
break;
@@ -986,7 +943,6 @@ export default {
labors: [],
loans: [],
parts: [],
partRequests: [],
scheduledUsers: [],
tasks: [],
travels: [],
@@ -1335,15 +1291,6 @@ and it's probably not a big list to fill anyway
!this.value.userIsSubContractorRestricted
);
},
showPartRequests: function() {
return (
this.pvm.useInventory &&
this.value.items[this.activeItemIndex].partRequests.length > 0 &&
this.form().showMe(this, "WorkOrderItemPartRequestList") &&
!this.value.userIsSubContractorRestricted
);
},
canAddLabor: function() {
return this.form().showMe(this, "WorkOrderItemLaborList");
},