lp1959010 have the staff display component check search context for the active search OU
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 23 Nov 2022 16:41:16 +0000 (11:41 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 28 Mar 2023 14:46:41 +0000 (10:46 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Signed-off-by: Mary Llewellyn <mllewell@biblio.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts

index f0418d1..f3991ed 100644 (file)
@@ -4,6 +4,7 @@ import {BibRecordService, BibRecordSummary
     } from '@eg/share/catalog/bib-record.service';
 import {ServerStoreService} from '@eg/core/server-store.service';
 import {CatalogService} from '@eg/share/catalog/catalog.service';
+import {StaffCatalogService} from '@eg/staff/catalog/catalog.service';
 
 @Component({
   selector: 'eg-bib-staff-view',
@@ -47,7 +48,8 @@ export class BibStaffViewComponent implements OnInit {
         private bib: BibRecordService,
         private org: OrgService,
         private store: ServerStoreService,
-        private cat: CatalogService
+        private cat: CatalogService,
+        private staffCat: StaffCatalogService
     ) {}
 
     ngOnInit() {
@@ -70,7 +72,7 @@ export class BibStaffViewComponent implements OnInit {
     loadSummary(): Promise<any> {
         return this.bib.getBibSummary(
             this.recId,
-            this.org.root().id(),
+            this.staffCat.searchContext.searchOrg.id(),
             true // isStaff
         ).toPromise()
         .then(summary => {