This commit is contained in:
@@ -29,6 +29,14 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("SoftDelete") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="canDelete && !isDeleted" @click="deleteAllItem">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$ayiTrashAlt</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{
|
||||
$ay.t("SoftDeleteAll")
|
||||
}}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$ayiTrashRestoreAlt</v-icon>
|
||||
@@ -898,6 +906,16 @@ export default {
|
||||
this.setDefaultView();
|
||||
this.$emit("change");
|
||||
},
|
||||
deleteAllItem() {
|
||||
this.value.items.forEach(z => (z.deleted = true));
|
||||
// //CHILDREN
|
||||
// this.value.items[this.activeItemIndex].scheduledUsers.forEach(
|
||||
// z => (z.deleted = true)
|
||||
// );
|
||||
//todo: other grandchildren
|
||||
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 && this.value.items && this.value.items.length == 1) {
|
||||
|
||||
Reference in New Issue
Block a user