This commit is contained in:
2021-04-16 17:29:34 +00:00
parent 3b4486a272
commit 1f2a911455
3 changed files with 48 additions and 72 deletions

View File

@@ -6,7 +6,7 @@
<div class="text-subtitle-1">
<v-icon color="primary">$ayiUserClock</v-icon>
{{ $ay.t("WorkOrderItemScheduledUserList") }}
<v-btn large icon v-bind="attrs" v-on="on">
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
</v-btn>
</div>
@@ -154,37 +154,6 @@ export default {
this.setDefaultView();
},
deleteItem() {
// if ((await window.$gz.dialog.confirmDelete()) != true) {
// return;
// }
// let o = this.value.items[this.activeWoItemIndex].scheduledUsers[
// this.activeItemIndex
// ];
// 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();
//SOFT DELETE TEST
//NO need to confirm, it's apparent?
//or maybe it's a big enough deal it should be confirmed
//or maybe on save it should prompt that some items will be deleted is this ok etc??
// if ((await window.$gz.dialog.confirmDelete()) != true) {
// return;
// }
this.value.items[this.activeWoItemIndex].scheduledUsers[
this.activeItemIndex
].deleted = true;
@@ -218,10 +187,6 @@ export default {
},
itemRowClasses: function(item) {
let ret = "";
// console.log("scheduseritemrowclass:", {
// activewoitemindex: this.activeWoItemIndex,
// activeItem: this.activeItemIndex
// });
const isDeleted =
this.value.items[this.activeWoItemIndex].scheduledUsers[item.index]
.deleted === true;
@@ -248,6 +213,9 @@ export default {
].deleted === true
);
},
parentDeleted: function() {
return this.value.items[this.activeWoItemIndex].deleted === true;
},
headerList: function() {
/*