LP1919483: Fix the queries for secondary admin pages
authorJane Sandberg <sandbej@linnbenton.edu>
Sun, 11 Jul 2021 22:49:19 +0000 (15:49 -0700)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 12 Aug 2021 18:52:45 +0000 (14:52 -0400)
To test, go to the following screens, and make sure that their
secondary admin pages don't show errors and filter properly.

* Authority Control Set
* Authority Thesaurus
* Course list
* Hard due dates
* MARC import remove fields
* MARC Search/Facet fields
* Z39.50 servers

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts

index 7cc1650..d9242bd 100644 (file)
@@ -275,7 +275,7 @@ export class AdminPageComponent implements OnInit {
                     this.idlClass, searchOps, {fleshSelectors: true});
             }
 
-            const search: any = new Array();
+            const search: any[] = new Array();
             const orgFilter: any = {};
 
             if (this.orgField && (this.searchOrgs || this.contextOrg)) {
@@ -290,13 +290,15 @@ export class AdminPageComponent implements OnInit {
                 });
             });
 
-            // FIXME - do we want to remove this, whose only present user
-            // is the booking grid, in favor of switching it to the built-in
+            // FIXME - do we want to remove this, which is used in several
+            // secondary admin pages, in favor of switching it to the built-in
             // grid filtering?
             if (this.gridFilters) {
                 // Lay the URL grid filters over our search object.
                 Object.keys(this.gridFilters).forEach(key => {
-                    search[key] = this.gridFilters[key];
+                    const urlProvidedFilters = {};
+                    urlProvidedFilters[key] = this.gridFilters[key];
+                    search.push(urlProvidedFilters);
                 });
             }