import {PermService} from '@eg/core/perm.service';
import {IdlObject} from '@eg/core/idl.service';
import {OrgService} from '@eg/core/org.service';
+import {ServerStoreService} from '@eg/core/server-store.service';
import {BibRecordService, BibRecordSummary} from '@eg/share/catalog/bib-record.service';
import {CatalogService} from '@eg/share/catalog/catalog.service';
import {StaffCatalogService} from '../catalog.service';
smsEnabled: boolean;
placeHoldsClicked: boolean;
+ puLibWsFallback = false;
+
@ViewChild('patronSearch', {static: false})
patronSearch: PatronSearchDialogComponent;
private evt: EventService,
private net: NetService,
private org: OrgService,
+ private store: ServerStoreService,
private auth: AuthService,
private pcrud: PcrudService,
private bib: BibRecordService,
this.userBarcode = this.staffCat.holdForBarcode;
}
+ this.store.getItem('circ.staff_placed_holds_fallback_to_ws_ou')
+ .then(setting => this.puLibWsFallback = setting === true);
+
if (!Array.isArray(this.holdTargets)) {
this.holdTargets = [this.holdTargets];
}
}
applyUserSettings() {
- if (!this.user || !this.user.settings()) { return; }
+ if (!this.user) { return; }
// Start with defaults.
this.phoneValue = this.user.day_phone() || this.user.evening_phone();
// Default to work org if placing holds for staff.
- if (this.user.id() !== this.requestor.id()) {
+ if (this.user.id() !== this.requestor.id() && !this.puLibWsFallback) {
+ // This value may be superseded below by user settings.
this.pickupLib = this.user.home_ou();
}
+ if (!this.user.settings()) { return; }
+
this.user.settings().forEach(setting => {
const name = setting.name();
let value = setting.value();
'eg.catalog.search_templates',
'opac.staff_saved_search.size',
'opac.search.enable_bookplate_search',
- 'eg.staffcat.exclude_electronic'
+ 'eg.staffcat.exclude_electronic',
+ 'circ.staff_placed_holds_fallback_to_ws_ou'
]).then(settings => {
this.staffCat.defaultSearchOrg =
this.org.get(settings['eg.search.search_lib']);