+<div class="row mt-3">
+ <div class="col-lg-4">
+ <div class="input-group">
+ <div class="input-group-prepend">
+ <div class="input-group-text" i18n>Holdings Maintenance</div>
+ </div>
+ <eg-org-select [initialOrg]="contextOrg"
+ (onChange)="contextOrgChanged($event)">
+ </eg-org-select>
+ </div>
+ </div>
+</div>
+
<!-- Location / Barcode cell template -->
<ng-template #locationTemplate let-row="row" let-userContext="userContext">
<!-- pl-* is doubled for added impact -->
import {GridToolbarCheckboxComponent} from '@eg/share/grid/grid-toolbar-checkbox.component';
import {ServerStoreService} from '@eg/core/server-store.service';
import {MarkDamagedDialogComponent
-} from '@eg/staff/share/holdings/mark-damaged-dialog.component';
+ } from '@eg/staff/share/holdings/mark-damaged-dialog.component';
import {MarkMissingDialogComponent
-} from '@eg/staff/share/holdings/mark-missing-dialog.component';
+ } from '@eg/staff/share/holdings/mark-missing-dialog.component';
// The holdings grid models a single HoldingsTree, composed of HoldingsTreeNodes
@ViewChild('markMissingDialog')
private markMissingDialog: MarkMissingDialogComponent;
-
holdingsTree: HoldingsTree;
// nodeType => id => tree node cache
return this._recId;
}
- // Allows the caller to update the context org unit
- private _co: IdlObject;
- @Input() set contextOrg(org: IdlObject) {
- this._co = org;
- if (this.initDone) {
- this.hardRefresh();
- }
- }
- get contextOrg(): IdlObject {
- return this._co;
- }
+ contextOrg: IdlObject;
constructor(
private net: NetService,
this.refreshHoldings = true;
this.renderFromPrefs = true;
+ // TODO: need a separate setting for this?
+ this.contextOrg = this.staffCat.searchContext.searchOrg;
+
this.rowClassCallback = (row: any): string => {
if (row.volume && !row.copy) {
return 'bg-info';
ngOnInit() {
this.initDone = true;
- if (!this.contextOrg) {
- this.contextOrg = this.org.get(this.auth.user().ws_ou());
- }
-
- // These are pre-cached via the resolver.
+ // These are pre-cached via the catalog resolver.
const settings = this.store.getItemBatchCached([
'cat.holdings_show_empty_org',
'cat.holdings_show_empty',
};
}
+ contextOrgChanged(org: IdlObject) {
+ this.contextOrg = org;
+ this.hardRefresh();
+ }
+
hardRefresh() {
this.renderFromPrefs = true;
this.refreshHoldings = true;