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

@@ -377,7 +377,10 @@ TODO: V7 features on wo I haven't coded yet
ServiceBank ServiceBank
any of it any of it
bugbug: empty collection, save, add new item but don't save then click on delete and save and it all goes weird
on save, it seems to be trying to save the newly added but deleted record when it should just remove it and get on with it
todo: workorderitemlabor new record stop date sb +1 hour todo: workorderitemlabor new record stop date sb +1 hour
todo: stop hiding one line tables in wo form, need them for the extra ui stuff they bring todo: stop hiding one line tables in wo form, need them for the extra ui stuff they bring
@@ -386,6 +389,9 @@ todo: stop hiding one line tables in wo form, need them for the extra ui stuff t
todo: mark for deletion with ONE record and no table?? how does that work? todo: mark for deletion with ONE record and no table?? how does that work?
keeping a single row as for above would help with this keeping a single row as for above would help with this
todo: no data available not localized in tables, not an issue if don't show when none, but is if do
todo: in german (maybe others) noticed price viz fields not available translations so shows ??ListPrice for example
todo: LoanUnit edit form add "*Cost" fields to UI todo: LoanUnit edit form add "*Cost" fields to UI
todo: part request todo: part request
link to open po, delete button in grid? both? link to open po, delete button in grid? both?

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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