From bae86acfa7f5e920bfb923b7c0db0f5b10850797 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 14 Sep 2020 21:14:05 -0400 Subject: [PATCH 1/1] 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 --- .../course-reserves/course-associate-users.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()); } } -- 2.43.2