LP#1917809 Create Course: Owning Library Default user/mmorgan/lp1917809_create_course_owning_library_default
authorMichele Morgan <mmorgan@noblenet.org>
Tue, 30 Mar 2021 20:16:59 +0000 (20:16 +0000)
committerMichele Morgan <mmorgan@noblenet.org>
Tue, 30 Mar 2021 20:16:59 +0000 (20:16 +0000)
Changes the default for the owning library in the Create Course modal to the logged
in user's workstation org unit instead of the consortium.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts

index a2e7328..b8088c1 100644 (file)
@@ -117,8 +117,10 @@ export class CourseListComponent implements OnInit, AfterViewInit {
 
     createNew() {
         this.editDialog.mode = 'create';
+        const course_module_course = this.idl.create('acmc');
+        course_module_course.owning_lib(this.auth.user().ws_ou());
         this.editDialog.recordId = null;
-        this.editDialog.record = null;
+        this.editDialog.record = course_module_course;
         this.editDialog.open({size: this.dialog_size}).subscribe(
             ok => {
                 this.createString.current()