* correctly extract the IDs of the user mappings to remove
* update the grid upon completion of the deletions
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
}
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 => {
.then(str => this.toast.danger(str));
}
);
- });
+ }).add(() => this.usersGrid.reload());
}
}