Hide location selector when searching root org
authorBill Erickson <berickxx@gmail.com>
Mon, 3 Dec 2018 16:18:13 +0000 (11:18 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 3 Dec 2018 16:18:13 +0000 (11:18 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts

index b339da2..eb76086 100644 (file)
@@ -94,7 +94,10 @@ export class SearchFormComponent implements OnInit, AfterViewInit {
 
         // TODO: is this how we avoid displaying too many locations?
         const org = this.searchContext.searchOrg;
-        if (org.id() === this.org.root().id()) { return; }
+        if (org.id() === this.org.root().id()) { 
+            this.copyLocations = [];
+            return; 
+        }
 
         this.cat.fetchCopyLocations(org).then(() =>
             this.copyLocations = this.cat.copyLocations