This commit is contained in:
@@ -209,6 +209,8 @@ export default {
|
|||||||
"Save",
|
"Save",
|
||||||
"SaveACopy",
|
"SaveACopy",
|
||||||
"Delete",
|
"Delete",
|
||||||
|
"SoftDelete",
|
||||||
|
"Undelete",
|
||||||
"Add",
|
"Add",
|
||||||
"Replace",
|
"Replace",
|
||||||
"Remove",
|
"Remove",
|
||||||
|
|||||||
@@ -18,11 +18,17 @@
|
|||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item v-if="canDelete" @click="deleteItem">
|
<v-list-item v-if="canDelete && !isDeleted" @click="deleteItem">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$ayiTrashAlt</v-icon>
|
<v-icon>$ayiTrashAlt</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ $ay.t("Delete") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("SoftDelete") }}</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>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
@@ -52,6 +58,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="activeItemIndex != null">
|
<template v-if="activeItemIndex != null">
|
||||||
|
<h1 v-if="isDeleted">MARKED FOR DELETE</h1>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<gz-decimal
|
<gz-decimal
|
||||||
v-model="
|
v-model="
|
||||||
@@ -140,7 +147,13 @@ export default {
|
|||||||
this.selectedRow = [{ index: newIndex }];
|
this.selectedRow = [{ index: newIndex }];
|
||||||
this.activeItemIndex = newIndex;
|
this.activeItemIndex = newIndex;
|
||||||
},
|
},
|
||||||
async deleteItem() {
|
unDeleteItem() {
|
||||||
|
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||||
|
this.activeItemIndex
|
||||||
|
].deleted = false;
|
||||||
|
this.setDefaultView();
|
||||||
|
},
|
||||||
|
deleteItem() {
|
||||||
// if ((await window.$gz.dialog.confirmDelete()) != true) {
|
// if ((await window.$gz.dialog.confirmDelete()) != true) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
@@ -175,20 +188,7 @@ export default {
|
|||||||
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].deleted = true;
|
].deleted = true;
|
||||||
// if (o.id != 0) {
|
this.setDefaultView();
|
||||||
// //it's a previously saved item so it needs to be removed at the server too
|
|
||||||
// this.$emit("graph-item-deleted", {
|
|
||||||
// atype: window.$gz.type.WorkOrderItemScheduledUser,
|
|
||||||
// id: o.id,
|
|
||||||
// objectIndex: this.activeItemIndex,
|
|
||||||
// woItemIndex: this.activeWoItemIndex
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// this.value.items[this.activeWoItemIndex].scheduledUsers.splice(
|
|
||||||
// this.activeItemIndex,
|
|
||||||
// 1
|
|
||||||
// );
|
|
||||||
// this.setDefaultView();
|
|
||||||
},
|
},
|
||||||
setDefaultView: function() {
|
setDefaultView: function() {
|
||||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ import {
|
|||||||
faToolbox,
|
faToolbox,
|
||||||
faTools,
|
faTools,
|
||||||
faTrashAlt,
|
faTrashAlt,
|
||||||
|
faTrashRestoreAlt,
|
||||||
faTruckLoading,
|
faTruckLoading,
|
||||||
faTruckMonster,
|
faTruckMonster,
|
||||||
faUndo,
|
faUndo,
|
||||||
@@ -389,6 +390,7 @@ library.add(
|
|||||||
faToolbox,
|
faToolbox,
|
||||||
faTools,
|
faTools,
|
||||||
faTrashAlt,
|
faTrashAlt,
|
||||||
|
faTrashRestoreAlt,
|
||||||
faTruckLoading,
|
faTruckLoading,
|
||||||
faTruckMonster,
|
faTruckMonster,
|
||||||
faUndo,
|
faUndo,
|
||||||
@@ -1322,6 +1324,12 @@ const CUSTOM_ICONS = {
|
|||||||
icon: ["fas", "trash-alt"]
|
icon: ["fas", "trash-alt"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ayiTrashRestoreAlt: {
|
||||||
|
component: FontAwesomeIcon,
|
||||||
|
props: {
|
||||||
|
icon: ["fas", "trash-restore-alt"]
|
||||||
|
}
|
||||||
|
},
|
||||||
ayiTruckLoading: {
|
ayiTruckLoading: {
|
||||||
component: FontAwesomeIcon,
|
component: FontAwesomeIcon,
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
Reference in New Issue
Block a user