<div class="input-group-prepend">
<div class="input-group-text" i18n>Pickup Library</div>
</div>
- <eg-org-select [initialOrg]="pickupLib" (onChange)="pickupLibChanged($event)">
+ <eg-org-select [persistKey]="persistKey" [fallbackOrg]="pickupLib"
+ (componentLoaded)="plCompLoaded = true" (onChange)="pickupLibChanged($event)">
</eg-org-select>
</div>
</div>
initDone = false;
holdsCount: number;
pickupLib: IdlObject;
+ plCompLoaded = false;
gridDataSource: GridDataSource;
detailHold: any;
editHolds: number[];
this.pickupLib = this.org.get(this.initialPickupLib);
if (this.preFetchSetting) {
-
- this.store.getItem(this.preFetchSetting).then(
- applied => this.enablePreFetch = Boolean(applied)
- );
-
+ this.store.getItem(this.preFetchSetting).then(
+ applied => this.enablePreFetch = Boolean(applied)
+ );
}
if (!this.defaultSort) {
}
this.gridDataSource.getRows = (pager: Pager, sort: any[]) => {
+
+ if (!this.hidePickupLibFilter && !this.plCompLoaded) {
+ // When the pickup lib selector is active, avoid any
+ // data fetches until it has settled on a default value.
+ // Once the final value is applied, its onchange will
+ // fire and we'll be back here with plCompLoaded=true.
+ return of([]);
+ }
+
sort = sort.length > 0 ? sort : this.defaultSort;
return this.fetchHolds(pager, sort);
};
)
);
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+ 'eg.orgselect.cat.catalog.wide_holds', 'gui', 'integer',
+ oils_i18n_gettext(
+ 'eg.orgselect.cat.catalog.wide_holds',
+ 'Default org unit for catalog holds org unit selector',
+ 'cwst', 'label'
+ )
+);
--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+ 'eg.orgselect.cat.catalog.wide_holds', 'gui', 'integer',
+ oils_i18n_gettext(
+ 'eg.orgselect.cat.catalog.wide_holds',
+ 'Default org unit for catalog holds org unit selector',
+ 'cwst', 'label'
+ )
+);
+
+COMMIT;
+
+