From: Galen Charlton Date: Tue, 15 Sep 2020 01:14:05 +0000 (-0400) Subject: LP#1849212: (follow-up) fixes to removing users from course X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bae86acfa7f5e920bfb923b7c0db0f5b10850797;p=evergreen%2Fpines.git LP#1849212: (follow-up) fixes to removing users from course * correctly extract the IDs of the user mappings to remove * update the grid upon completion of the deletions Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-users.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-users.component.ts index f2aa9de5b4..f281342f6f 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-users.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-users.component.ts @@ -124,8 +124,8 @@ export class CourseAssociateUsersComponent extends DialogComponent implements On } deleteSelectedUsers(users) { - const user_ids = []; - this.pcrud.search('acmcu', {course: this.courseId, usr: user_ids}).subscribe(user => { + const acmcu_ids = users.map(u => u.id()); + this.pcrud.search('acmcu', {course: this.courseId, id: acmcu_ids}).subscribe(user => { user.isdeleted(true); this.pcrud.autoApply(user).subscribe( val => { @@ -138,7 +138,7 @@ export class CourseAssociateUsersComponent extends DialogComponent implements On .then(str => this.toast.danger(str)); } ); - }); + }).add(() => this.usersGrid.reload()); } }