LP#1879983: add Curbside Pickup to the Angular navbar
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 2 Jun 2020 18:51:35 +0000 (14:51 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 15 Sep 2020 20:20:43 +0000 (16:20 -0400)
For both the Angular and AngularJS staff interfaces, the
Curbside Pickup option in the Circulation menu is displayed
only if circ.curbside has been enabled for the workstation
library.

Sponsored-by: PaILS
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/eg2/src/app/staff/nav.component.ts

index 7725341..7f0eb23 100644 (file)
             <span class="material-icons" aria-hidden="true">signal_wifi_off</span>
             <span i18n>Offline Circulation</span>
           </a>
+          <div *ngIf="curbsideEnabled" class="dropdown-divider"></div>
+          <a *ngIf="curbsideEnabled" class="dropdown-item" href="/eg/staff/circ/curbside/index">
+            <span class="material-icons">directions_bus</span>
+            <span i18n>Curbside Pickup</span>
+          </a>
         </div>
       </div>
     </div>
index 497cd30..89d98ac 100644 (file)
@@ -25,6 +25,7 @@ export class StaffNavComponent implements OnInit, OnDestroy {
 
     // When active, show a link to the experimental Angular staff catalog
     showAngularCatalog: boolean;
+    curbsideEnabled: boolean;
 
     @ViewChild('navOpChange', {static: false}) opChange: OpChangeComponent;
     permFailedSub: Subscription;
@@ -60,6 +61,9 @@ export class StaffNavComponent implements OnInit, OnDestroy {
             this.org.settings('ui.staff.angular_catalog.enabled')
             .then(settings => this.showAngularCatalog =
                 Boolean(settings['ui.staff.angular_catalog.enabled']));
+            this.org.settings('circ.curbside')
+            .then(settings => this.curbsideEnabled =
+                Boolean(settings['circ.curbside']));
         }
 
         // Wire up our op-change component as the general purpose