fix catalog_summary vs catalog_summary.staff bug
authorJason Etheridge <jason@EquinoxOLI.org>
Mon, 7 Nov 2022 22:36:56 +0000 (17:36 -0500)
committerJason Etheridge <jason@EquinoxOLI.org>
Wed, 4 Jan 2023 13:44:01 +0000 (08:44 -0500)
searchOrg depth was being passed where a boolean was expected

This seems like a failure of TypeScript to detect.. type.  What was going on here?

Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts
Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts

index de49b26..294842a 100644 (file)
@@ -155,7 +155,7 @@ export class RecordComponent implements OnInit {
         this.bib.getBibSummary(
             this.recordId,
             this.searchContext.searchOrg.id(),
-            this.searchContext.searchOrg.ou_type().depth()).toPromise()
+            this.searchContext.isStaff).toPromise()
         .then(summary => {
             this.summary =
                 this.staffCat.currentDetailRecordSummary = summary;
index ca2f76b..2165705 100644 (file)
@@ -64,7 +64,11 @@ export class BibStaffViewComponent implements OnInit {
     }
 
     loadSummary(): Promise<any> {
-        return this.bib.getBibSummary(this.recordId).toPromise()
+        return this.bib.getBibSummary(
+            this.recordId,
+            this.org.root().id(),
+            true // isStaff
+        ).toPromise()
         .then(summary => {
             this.summary = summary;
             return summary.getBibCallNumber();