diff --git a/ayanova/src/components/work-order-item-tasks.vue b/ayanova/src/components/work-order-item-tasks.vue
index e836ce9d..b9b853b5 100644
--- a/ayanova/src/components/work-order-item-tasks.vue
+++ b/ayanova/src/components/work-order-item-tasks.vue
@@ -27,18 +27,25 @@
{{ $ay.t("TaskGroup") }}
-
+
+
+ $ayiTrashRestoreAlt
+
+ {{ $ay.t("Undelete") }}
+
$ayiTrashAlt
{{ $ay.t("SoftDelete") }}
-
+
- $ayiTrashRestoreAlt
+ $ayiTrashAlt
- {{ $ay.t("Undelete") }}
+ {{
+ $ay.t("SoftDeleteAll")
+ }}
@@ -461,6 +468,13 @@ export default {
this.setDefaultView();
this.$emit("change");
},
+ deleteAllItem() {
+ this.value.items[this.activeWoItemIndex].tasks.forEach(
+ z => (z.deleted = true)
+ );
+ this.setDefaultView();
+ this.$emit("change");
+ },
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].tasks.length == 1) {
@@ -614,11 +628,10 @@ export default {
return this.pvm.rights.change && this.pvm.subRights.tasks.create;
},
canDelete: function() {
- return (
- this.activeItemIndex != null &&
- this.pvm.rights.change &&
- this.pvm.subRights.tasks.delete
- );
+ return this.activeItemIndex != null && this.canDeleteAll;
+ },
+ canDeleteAll: function() {
+ return this.pvm.rights.change && this.pvm.subRights.tasks.delete;
}
}
};
diff --git a/ayanova/src/components/work-order-item-travels.vue b/ayanova/src/components/work-order-item-travels.vue
index cb4e75a0..f8a175d7 100644
--- a/ayanova/src/components/work-order-item-travels.vue
+++ b/ayanova/src/components/work-order-item-travels.vue
@@ -21,17 +21,25 @@
{{ $ay.t("New") }}
+
+
+ $ayiTrashRestoreAlt
+
+ {{ $ay.t("Undelete") }}
+
$ayiTrashAlt
{{ $ay.t("SoftDelete") }}
-
+
- $ayiTrashRestoreAlt
+ $ayiTrashAlt
- {{ $ay.t("Undelete") }}
+ {{
+ $ay.t("SoftDeleteAll")
+ }}
@@ -527,6 +535,13 @@ export default {
this.setDefaultView();
this.$emit("change");
},
+ deleteAllItem() {
+ this.value.items[this.activeWoItemIndex].travels.forEach(
+ z => (z.deleted = true)
+ );
+ this.setDefaultView();
+ this.$emit("change");
+ },
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].travels.length == 1) {
@@ -909,12 +924,12 @@ export default {
return this.pvm.rights.change && this.pvm.subRights.travels.create;
},
canDelete: function() {
- return (
- this.activeItemIndex != null &&
- this.pvm.rights.change &&
- this.pvm.subRights.travels.delete
- );
+ return this.activeItemIndex != null && this.canDeleteAll;
+ },
+ canDeleteAll: function() {
+ return this.pvm.rights.change && this.pvm.subRights.travels.delete;
}
+
//----
}
};