When the top level org unit is selected in the staff catalog you
only have the option to search all shelving locations.
This allows you to filter on the root org unit's shelving
locations, which is the same behavior as the OPAC.
To test:
1. Make sure the top level org unit has shelving locations
(Local Administration->Shelving Locations Editor)
2. In the staff catalog, select the top level org unit
3. Click the three dot icon next to the query text input
4. The root org unit's shelving location options display
Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
}
fetchCopyLocations(contextOrg: number | IdlObject): Promise<any> {
- const orgIds = this.org.fullPath(contextOrg, true);
+ const contextOrgId: any = this.org.get(contextOrg).id();
+
+ const orgIds: any[] = contextOrgId === this.org.root().id()
+ ? [contextOrgId]
+ : this.org.fullPath(contextOrg, true);
+
this.copyLocations = [];
return this.pcrud.search('acpl',
refreshCopyLocations() {
if (!this.showFilters()) { return; }
- // TODO: is this how we avoid displaying too many locations?
- const org = this.context.searchOrg;
- if (org.id() === this.org.root().id()) {
- this.copyLocations = [];
- return;
- }
-
- this.cat.fetchCopyLocations(org).then(() =>
+ this.cat.fetchCopyLocations(this.context.searchOrg).then(() =>
this.copyLocations = this.cat.copyLocations
);
}