From: Bill Erickson Date: Fri, 16 Mar 2018 18:00:04 +0000 (+0000) Subject: LP#1626157 global search holdings fix X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3041d7e631b1676e2ab42b7f52c3e49015bb5535;p=working%2FEvergreen.git LP#1626157 global search holdings fix Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/core/store.ts b/Open-ILS/src/eg2/src/app/core/store.ts index 2b3522b8cd..218ad8375b 100644 --- a/Open-ILS/src/eg2/src/app/core/store.ts +++ b/Open-ILS/src/eg2/src/app/core/store.ts @@ -10,7 +10,9 @@ export class EgStoreService { // Base path for cookie-based storage. // Useful for limiting cookies to subsections of the application. - loginSessionBasePath: string; + // Store cookies globally by default. + // Note cookies shared with /eg/staff must be stored at "/" + loginSessionBasePath: string = '/'; // Set of keys whose values should disappear at logout. loginSessionKeys: string[] = [ diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts index a8e9417e54..b8e05f0baa 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts @@ -46,12 +46,19 @@ export class CopiesComponent implements OnInit { fetchCopies(): void { this.copies = []; + + // "Show Result from All Libraries" i.e. global search displays + // copies from all branches, sorted by search/pref libs. + let copy_depth = this.staffCat.searchContext.global ? + this.org.root().ou_type().depth() : + this.staffCat.searchContext.searchOrg.ou_type().depth(); + this.net.request( 'open-ils.search', 'open-ils.search.bib.copies.staff', this.recId, this.staffCat.searchContext.searchOrg.id(), - this.staffCat.searchContext.searchOrg.ou_type().depth(), // TODO + copy_depth, this.pager.limit, this.pager.offset, this.staffCat.prefOrg ? this.staffCat.prefOrg.id() : null diff --git a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts index d37ca2f65d..63a86f9b11 100644 --- a/Open-ILS/src/eg2/src/app/staff/resolver.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/resolver.service.ts @@ -38,7 +38,7 @@ export class EgStaffResolver implements Resolve> { // NOTE: storing session data at '/' so it can be shared by // Angularjs apps. this.store.loginSessionBasePath = '/'; - //this.ngLocation.prepareExternalUrl('/staff'); + // ^-- = this.ngLocation.prepareExternalUrl('/staff'); // Not sure how to get the path without params... using this for now. let path = state.url.split('?')[0]