This commit is contained in:
@@ -209,6 +209,8 @@ export default {
|
||||
"Save",
|
||||
"SaveACopy",
|
||||
"Delete",
|
||||
"SoftDelete",
|
||||
"Undelete",
|
||||
"Add",
|
||||
"Replace",
|
||||
"Remove",
|
||||
|
||||
@@ -18,11 +18,17 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||
</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-icon>$ayiTrashAlt</v-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>
|
||||
</v-menu>
|
||||
@@ -52,6 +58,7 @@
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-if="activeItemIndex != null">
|
||||
<h1 v-if="isDeleted">MARKED FOR DELETE</h1>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-decimal
|
||||
v-model="
|
||||
@@ -140,7 +147,13 @@ export default {
|
||||
this.selectedRow = [{ index: 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) {
|
||||
// return;
|
||||
// }
|
||||
@@ -175,20 +188,7 @@ export default {
|
||||
this.value.items[this.activeWoItemIndex].scheduledUsers[
|
||||
this.activeItemIndex
|
||||
].deleted = true;
|
||||
// if (o.id != 0) {
|
||||
// //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();
|
||||
this.setDefaultView();
|
||||
},
|
||||
setDefaultView: function() {
|
||||
//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,
|
||||
faTools,
|
||||
faTrashAlt,
|
||||
faTrashRestoreAlt,
|
||||
faTruckLoading,
|
||||
faTruckMonster,
|
||||
faUndo,
|
||||
@@ -389,6 +390,7 @@ library.add(
|
||||
faToolbox,
|
||||
faTools,
|
||||
faTrashAlt,
|
||||
faTrashRestoreAlt,
|
||||
faTruckLoading,
|
||||
faTruckMonster,
|
||||
faUndo,
|
||||
@@ -1322,6 +1324,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "trash-alt"]
|
||||
}
|
||||
},
|
||||
ayiTrashRestoreAlt: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "trash-restore-alt"]
|
||||
}
|
||||
},
|
||||
ayiTruckLoading: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user