diff --git a/ayanova/src/components/work-order-item-scheduled-users.vue b/ayanova/src/components/work-order-item-scheduled-users.vue index 9b5f1702..e5b1c9c0 100644 --- a/ayanova/src/components/work-order-item-scheduled-users.vue +++ b/ayanova/src/components/work-order-item-scheduled-users.vue @@ -138,7 +138,16 @@ export default { if ((await window.$gz.dialog.confirmDelete()) != true) { return; } - console.log(`STUB: DELETE scheduserITEM id:${this.selectedRow[0].id}`); + this.value.items[this.pvm.selectedItemIndex].scheduledUsers.splice( + this.pvm.selectedScheduledUserItemIndex, + 1 + ); + if (this.pvm.scheduledUserItemCount > 0) { + this.pvm.selectedScheduledUserItemIndex = + this.pvm.scheduledUserItemCount - 1; + } else { + this.pvm.selectedScheduledUserItemIndex = null; + } }, selectItem: function(item) { this.selectedRow = [item]; diff --git a/ayanova/src/components/work-order-items.vue b/ayanova/src/components/work-order-items.vue index 56228406..3f87ff88 100644 --- a/ayanova/src/components/work-order-items.vue +++ b/ayanova/src/components/work-order-items.vue @@ -125,7 +125,12 @@ export default { if ((await window.$gz.dialog.confirmDelete()) != true) { return; } - console.log(`STUB: DELETE ITEM id:${this.selectedRow[0].id}`); + this.value.items.splice(this.pvm.selectedItemIndex, 1); + if (this.value.items.length > 0) { + this.pvm.selectedItemIndex = this.value.items.length - 1; + } else { + this.pvm.selectedItemIndex = null; + } }, selectItem: function(item) { this.selectedRow = [item];