This commit is contained in:
2021-04-07 23:42:03 +00:00
parent db0094f5ed
commit 0b9e154484
2 changed files with 16 additions and 2 deletions

View File

@@ -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];

View File

@@ -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];