This commit is contained in:
@@ -211,6 +211,7 @@ export default {
|
||||
"SaveACopy",
|
||||
"Delete",
|
||||
"SoftDelete",
|
||||
"SoftDeleteAll",
|
||||
"Undelete",
|
||||
"Add",
|
||||
"Replace",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -115,17 +115,17 @@ export default {
|
||||
x.id = 0;
|
||||
x.concurrency = undefined;
|
||||
x.isDirty = true;
|
||||
x.cost = 0;
|
||||
x.listPrice = 0;
|
||||
});
|
||||
z.parts.forEach(x => {
|
||||
x.id = 0;
|
||||
x.concurrency = undefined;
|
||||
x.isDirty = true;
|
||||
x.cost = 0;
|
||||
x.listPrice = 0;
|
||||
});
|
||||
// z.partRequests.forEach(x => {
|
||||
// x.id = 0;
|
||||
// x.concurrency = undefined;
|
||||
// x.isDirty = true;
|
||||
// });
|
||||
|
||||
z.scheduledUsers.forEach(x => {
|
||||
x.id = 0;
|
||||
x.concurrency = undefined;
|
||||
|
||||
Reference in New Issue
Block a user