From: Jason Etheridge Date: Mon, 3 Oct 2022 05:58:21 +0000 (-0400) Subject: experimenting with layout and stripping courses functionality X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2a04291005c92b8da0289a382eeb44d0c5ad6bc7;p=working%2FEvergreen.git experimenting with layout and stripping courses functionality --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html index 56438fa545..95af1a680c 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html @@ -32,19 +32,7 @@
- - -
- - Jacket Image - -
-
- - -
+
  • diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts index 0a0236478b..ca2f76bf0f 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts @@ -1,6 +1,5 @@ import {Component, OnInit, Input} from '@angular/core'; import {OrgService} from '@eg/core/org.service'; -import {CourseService} from '@eg/staff/share/course.service'; import {BibRecordService, BibRecordSummary } from '@eg/share/catalog/bib-record.service'; import {ServerStoreService} from '@eg/core/server-store.service'; @@ -14,8 +13,6 @@ import {CatalogService} from '@eg/share/catalog/catalog.service'; export class BibStaffViewComponent implements OnInit { initDone = false; - hasCourse = false; - courses: any; // True / false if the display is vertically expanded private _exp: boolean; @@ -36,7 +33,6 @@ export class BibStaffViewComponent implements OnInit { this.summary = s; if (this.initDone && this.summary) { this.summary.getBibCallNumber(); - this.loadCourseInformation(this.summary.record.id()); } } @@ -44,8 +40,7 @@ export class BibStaffViewComponent implements OnInit { private bib: BibRecordService, private org: OrgService, private store: ServerStoreService, - private cat: CatalogService, - private course: CourseService + private cat: CatalogService ) {} ngOnInit() { @@ -55,8 +50,7 @@ export class BibStaffViewComponent implements OnInit { .then(_ => this.cat.fetchCcvms()) .then(_ => { if (this.summary) { - return this.loadCourseInformation(this.summary.record.id()) - .then(__ => this.summary.getBibCallNumber()); + return this.summary.getBibCallNumber(); } else { if (this.recordId) { return this.loadSummary(); @@ -70,27 +64,10 @@ export class BibStaffViewComponent implements OnInit { } loadSummary(): Promise { - return this.loadCourseInformation(this.recordId) - .then(_ => { - return this.bib.getBibSummary(this.recordId).toPromise() - .then(summary => { - this.summary = summary; - return summary.getBibCallNumber(); - }); - }); - } - - loadCourseInformation(recordId): Promise { - return this.org.settings('circ.course_materials_opt_in') - .then(setting => { - if (setting['circ.course_materials_opt_in']) { - this.course.fetchCoursesForRecord(recordId).then(courseList => { - if (courseList) { - this.courses = courseList; - this.hasCourse = true; - } - }); - } + return this.bib.getBibSummary(this.recordId).toPromise() + .then(summary => { + this.summary = summary; + return summary.getBibCallNumber(); }); }