This commit is contained in:
@@ -72,7 +72,8 @@
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -507,7 +508,10 @@ export default {
|
||||
},
|
||||
setDefaultView: function() {
|
||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||
if (this.value.items[this.activeWoItemIndex].expenses.length == 1) {
|
||||
if (
|
||||
this.hasData &&
|
||||
this.value.items[this.activeWoItemIndex].expenses.length == 1
|
||||
) {
|
||||
this.selectedRow = [{ index: 0 }];
|
||||
this.activeItemIndex = 0;
|
||||
} else {
|
||||
@@ -722,9 +726,11 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].expenses.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.expenses.create;
|
||||
},
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -799,6 +800,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].labors.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -822,6 +823,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].loans.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -1025,6 +1026,11 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return (
|
||||
this.value.items[this.activeWoItemIndex].outsideServices.length > 0
|
||||
);
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -380,6 +381,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].partRequests.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
// canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -684,6 +685,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].parts.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -522,6 +523,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].scheduledUsers.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -581,6 +582,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].tasks.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -799,6 +800,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].travels.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
|
||||
</template>
|
||||
<template v-if="hasData && hasSelection">
|
||||
<v-btn
|
||||
v-if="canDelete && isDeleted"
|
||||
large
|
||||
@@ -452,6 +453,9 @@ export default {
|
||||
return this.pvm.formCustomTemplateKey;
|
||||
},
|
||||
hasData: function() {
|
||||
return this.value.items[this.activeWoItemIndex].units.length > 0;
|
||||
},
|
||||
hasSelection: function() {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
|
||||
Reference in New Issue
Block a user