This commit is contained in:
2021-06-01 18:14:08 +00:00
parent 3f9696c95c
commit 77c4ec1fb9
12 changed files with 78 additions and 68 deletions

View File

@@ -5,7 +5,7 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2"
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiMoneyBillWave</v-icon
>
{{ $ay.t("WorkOrderItemExpenseList") }}
@@ -37,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -72,8 +72,7 @@
</template>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -722,9 +721,10 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].expenses.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.expenses.create;
},

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiHammer</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiHammer</v-icon
>
{{ $ay.t("WorkOrderItemLaborList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -35,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -57,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -797,8 +798,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].labors.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.labors.create;

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiPlug</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiPlug</v-icon
>
{{ $ay.t("WorkOrderItemLoanList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -35,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -57,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -820,8 +821,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].loans.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.loans.create;

View File

@@ -5,7 +5,7 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2"
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiLuggageCart</v-icon
>
{{ $ay.t("WorkOrderItemOutsideServiceList") }}
@@ -37,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -59,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -1025,10 +1024,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return (
this.value.items[this.activeWoItemIndex].outsideServices.length > 1
);
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return (

View File

@@ -5,7 +5,7 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2"
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiParachuteBox</v-icon
>
{{ $ay.t("WorkOrderItemPartRequestList") }}
@@ -31,7 +31,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -59,8 +59,7 @@
</template>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -380,8 +379,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].partRequests.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
// canAdd: function() {
// return this.pvm.rights.change && this.pvm.subRights.partRequests.create;

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiBoxes</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiBoxes</v-icon
>
{{ $ay.t("WorkOrderItemPartList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -35,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -57,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -682,8 +683,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].parts.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.parts.create;

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiUserClock</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiUserClock</v-icon
>
{{ $ay.t("WorkOrderItemScheduledUserList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -35,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ################################ SCHEDULED USERS TABLE ############################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -57,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -520,8 +521,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].scheduledUsers.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.scheduledUsers.create;

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiTasks</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiTasks</v-icon
>
{{ $ay.t("WorkOrderItemTasks") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -42,7 +44,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -64,8 +66,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -579,8 +580,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].tasks.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.tasks.create;

View File

@@ -5,7 +5,7 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2"
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiTruckMonster</v-icon
>
{{ $ay.t("WorkOrderItemTravelList") }}
@@ -37,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -59,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -799,8 +798,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].travels.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.travels.create;

View File

@@ -5,7 +5,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2">$ayiFan</v-icon>
<v-icon large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiFan</v-icon
>
{{ $ay.t("WorkOrderItemUnitList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -35,7 +37,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template v-if="hasData">
<!-- ############################################################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -57,8 +59,7 @@
>
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -450,8 +451,8 @@ export default {
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value.items[this.activeWoItemIndex].units.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return this.pvm.rights.change && this.pvm.subRights.units.create;

View File

@@ -6,7 +6,9 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h5">
<v-icon x-large color="primary" class="mr-2">$ayiWrench</v-icon>
<v-icon x-large :color="hasData ? 'primary' : null" class="mr-2"
>$ayiWrench</v-icon
>
{{ $ay.t("WorkOrderItemList") }}
<v-btn large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -37,7 +39,7 @@
</v-menu>
</v-col>
<template v-if="showTable">
<template>
<!-- ################################ WORK ORDER ITEMS TABLE ############################### -->
<v-col cols="12" class="mb-10">
<v-data-table
@@ -82,7 +84,7 @@
</v-data-table>
</v-col>
</template>
<template v-if="activeItemIndex != null">
<template v-if="hasData">
<v-btn
v-if="canDelete && isDeleted"
large
@@ -816,9 +818,10 @@ and it's probably not a big list to fill anyway
formCustomTemplateKey: function() {
return this.pvm.formCustomTemplateKey;
},
showTable: function() {
return this.value && this.value.items && this.value.items.length > 1;
hasData: function() {
return this.activeItemIndex != null;
},
canAdd: function() {
return (
!this.pvm.formState.readOnly &&