From: Jane Sandberg Date: Wed, 2 Sep 2020 16:37:50 +0000 (-0700) Subject: LP1849212: fix editing for course materials X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2cc2d229903f0e0bc8f1a347360e7d7b82e73381;p=working%2FEvergreen.git LP1849212: fix editing for course materials Signed-off-by: Jane Sandberg Signed-off-by: Michele Morgan --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts index 6881531d11..bb695193dd 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts @@ -132,9 +132,9 @@ export class CourseAssociateMaterialComponent extends DialogComponent implements editOneThing(itemFields.shift()); } - showEditDialog(course_material: IdlObject): Promise { + showEditDialog(courseMaterial: IdlObject): Promise { this.editDialog.mode = 'update'; - this.editDialog.recordId = course_material._id; + this.editDialog.recordId = courseMaterial.id(); return new Promise((resolve, reject) => { this.editDialog.open({size: 'lg'}).subscribe( result => { @@ -142,11 +142,9 @@ export class CourseAssociateMaterialComponent extends DialogComponent implements .then(str => this.toast.success(str)); this.pcrud.retrieve('acmcm', result).subscribe(material => { if (material.course() !== this.courseId) { - this.materialsDataSource.data.splice( - this.materialsDataSource.data.indexOf(course_material, 0), 1 - ); + this.materialsGrid.reload(); } else { - course_material._relationship = material.relationship(); + courseMaterial.relationship = material.relationship(); } }); resolve(result);