</div>
</div>
+ <div class="navbar-nav" *ngIf="showAngularCirc">
+ <div ngbDropdown class="nav-item dropdown">
+ <a ngbDropdownToggle i18n class="nav-link dropdown-toggle">
+ Circulation (Experimental)
+ </a>
+ <div class="dropdown-menu" ngbDropdownMenu>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/search">
+ <span class="material-icons" aria-hidden="true">person</span>
+ <span i18n>Search for Patrons</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/bcsearch"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="f1" keyDesc="Checkout">
+ <span class="material-icons" aria-hidden="true">trending_up</span>
+ <span i18n>Check Out</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/checkin"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="f2" keyDesc="Checkin">
+ <span class="material-icons" aria-hidden="true">trending_down</span>
+ <span i18n>Check In</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/checkin/capture"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="shift+f2" keyDesc="Capture Holds">
+ <span class="material-icons" aria-hidden="true">pin_drop</span>
+ <span i18n>Capture Holds</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/holds/pull-list">
+ <span class="material-icons" aria-hidden="true">view_list</span>
+ <span i18n>Pull List for Hold Requests</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/renew"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="ctrl+f2" keyDesc="Renew Items">
+ <span class="material-icons" aria-hidden="true">autorenew</span>
+ <span i18n>Renew Items</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/register"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="shift+f1" keyDesc="Register Patron">
+ <span class="material-icons" aria-hidden="true">person_add</span>
+ <span i18n>Register Patron</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/last"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="f8" keyDesc="Retrieve Last Patron">
+ <span class="material-icons" aria-hidden="true">redo</span>
+ <span i18n>Retrieve Last Patron</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/search/recents"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="shift+f4" keyDesc="Retrieve Recent Patrons">
+ <span class="material-icons" aria-hidden="true">redo</span>
+ <span i18n>Retrieve Recent Patrons</span>
+ </a>
+ <a class="dropdown-item" routerLink="/staff/circ/patron/credentials"
+ egAccessKey keyCtx="navbar" i18n-keySpec i18n-keyDesc
+ keySpec="alt+c" keyDesc="Verify Patron Credentials">
+ <span class="material-icons" aria-hidden="true">check_circle</span>
+ <span i18n>Verify Credentials</span>
+ </a>
+ </div>
+ </div>
+ </div>
+
<!-- CATALOGING -->
<div class="navbar-nav">
import {StoreService} from '@eg/core/store.service';
import {NetRequest, NetService} from '@eg/core/net.service';
import {OpChangeComponent} from '@eg/staff/share/op-change/op-change.component';
+import {PermService} from '@eg/core/perm.service';
@Component({
selector: 'eg-staff-nav-bar',
showTraditionalCatalog = true;
showAngularAcq: boolean;
curbsideEnabled: boolean;
+ showAngularCirc = false;
@ViewChild('navOpChange', {static: false}) opChange: OpChangeComponent;
permFailedSub: Subscription;
private net: NetService,
private org: OrgService,
private auth: AuthService,
+ private perm: PermService,
private pcrud: PcrudService,
private locale: LocaleService,
private printer: PrintService
this.org.settings('circ.curbside')
.then(settings => this.curbsideEnabled =
Boolean(settings['circ.curbside']));
+
+ // Do we show the angular circ menu?
+ // TODO remove these once Angular Circ takes over.
+ const angSet = 'ui.staff.angular_circ.enabled';
+ const angPerm = 'ACCESS_ANGULAR_CIRC';
+
+ this.org.settings(angSet).then(s => {
+ if (s[angSet]) {
+ return this.perm.hasWorkPermHere([angPerm])
+ .then(perms => perms[angPerm]);
+ } else {
+ return false;
+ }
+ }).then(enable => this.showAngularCirc = enable);
}
// Wire up our op-change component as the general purpose
/**
* Fetches data common to all staff interfaces.
*/
- loadStartupData(): Promise<void> {
+ loadStartupData(): Promise<any> {
// Fetch settings needed globally. This will cache the values
// in the org service.
'webstaff.format.date_and_time',
'ui.staff.max_recent_patrons',
'circ.curbside', // navbar
+ 'ui.staff.angular_circ.enabled',
'ui.staff.angular_catalog.enabled' // navbar
]).then(settings => {
// Avoid clobbering defaults
this.format.dateTimeFormat =
settings['webstaff.format.date_and_time'];
}
+ // TODO remove these once Angular Circ takes over.
+ if (settings['ui.staff.angular_circ.enabled']) {
+ return this.perm.hasWorkPermHere(['ACCESS_ANGULAR_CIRC']);
+ }
});
}
}
</ul>
</li><!-- circ -->
+
+ <!-- circulation experimental -->
+ <li class="dropdown" uib-dropdown ng-if="showAngularCirc">
+ <a href uib-dropdown-toggle>[% l('Circulation (Experimental)') %]
+ <b class="caret" aria-hidden="true"></b>
+ </a>
+
+ <ul uib-dropdown-menu>
+ <li>
+ <a href="/eg2/staff/circ/patron/search">
+ <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
+ <span>[% l('Search for Patrons') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/patron/bcsearch">
+ <span class="glyphicon glyphicon-export" aria-hidden="true"></span>
+ <span>[% l('Check Out') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/checkin">
+ <span class="glyphicon glyphicon-import" aria-hidden="true"></span>
+ <span>[% l('Check In') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/checkin/capture">
+ <span class="glyphicon glyphicon-pushpin" aria-hidden="true"></span>
+ <span>[% l('Capture Holds') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/holds/pull-list">
+ <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
+ <span>[% l('Pull List for Hold Requests') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/renew">
+ <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
+ <span>[% l('Renew Items') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/patron/register">
+ <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
+ <span>[% l('Register Patron') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/patron/last">
+ <span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
+ <span>[% l('Retrieve Last Patron') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/patron/search/recents">
+ <span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
+ <span>[% l('Retrieve Recent Patrons') %]</span>
+ </a>
+ </li>
+ <li>
+ <a href="/eg2/staff/circ/patron/credentials" >
+ <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
+ <span>[% l('Verify Credentials') %]</span>
+ </a>
+ </li>
+ </ul>
+ </li>
+
<!-- cataloging -->
<li class="dropdown" uib-dropdown>
<a href uib-dropdown-toggle>[% l('Cataloging') %]<b class="caret"
egCore , $uibModal , ngToast , egOpChange , $element , egLovefield) {
$scope.rs = $rootScope;
+ $scope.showAngularCirc = false;
$scope.reprintLast = function (e) {
egCore.print.reprintLast();
egCore.org.settings([
'ui.staff.max_recent_patrons',
'ui.staff.traditional_catalog.enabled',
+ 'ui.staff.angular_circ.enabled',
'ui.staff.angular_acq_selection.enabled',
'circ.curbside'
]).then(function(s) {
$scope.showTraditionalCatalog = (val !== false);
$scope.showAngularAcq =
s['ui.staff.angular_acq_selection.enabled'];
- $scope.enableCurbside =
- s['circ.curbside'];
+ $scope.enableCurbside = s['circ.curbside'];
+
+ if (s['ui.staff.angular_circ.enabled']) {
+ egCore.perm.hasPermHere('ACCESS_ANGULAR_CIRC')
+ .then(function(yes) { $scope.showAngularCirc = yes; });
+ }
}).then(function() {
// need to defer initialization of hotkeys to this point
// as it depends on various settings.