<li class="list-group-item">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox"
- id="hide-classification-column"
+ id="circ_lib_mod_with_owning_lib-column"
[(ngModel)]="volcopy.defaults.values.circ_lib_mod_with_owning_lib">
<label class="form-check-label"
- for="hide-circ_lib_mod_with_owning_lib-column" i18n>
+ for="circ_lib_mod_with_owning_lib-column" i18n>
Change Circ Lib When Owning Lib Changes
</label>
</div>
</li>
+ <li class="list-group-item">
+ <div class="form-check form-check-inline">
+ <label class="mr-2" for="statcat_filter" i18n>
+ Stat Cat Filter
+ </label>
+ <eg-org-select
+ domId="statcat_filter"
+ placeholder="Stat Cat Filter..." i18n-placeholder
+ [initialOrgId]="volcopy.defaults.values.statcat_filter"
+ (onChange)="volcopy.defaults.values.statcat_filter = $event ? $event.id() : null">
+ </eg-org-select>
+ </div>
+ </li>
</ul>
</div>
</div>
<li class="list-group-item">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox"
+ id="show-statcat_filter-attr"
+ [(ngModel)]="volcopy.defaults.hidden.statcat_filter">
+ <label class="form-check-label" for="show-statcat_filter-attr" i18n>
+ Stat Cat Filter
+ </label>
+ </div>
+ </li>
+ <li class="list-group-item">
+ <div class="form-check form-check-inline">
+ <input class="form-check-input" type="checkbox"
id="show-statcats-attr"
[(ngModel)]="volcopy.defaults.hidden.statcats">
<label class="form-check-label" for="show-statcats-attr" i18n>
</div>
</div>
+ <div class="border rounded m-1" *ngIf="displayAttr('statcat_filter')">
+ <div class="batch-header font-weight-bold p-2" i18n>Add Item Tags</div>
+ <div class="p-1">
+ <eg-org-select
+ domId="statcat_filter-select"
+ placeholder="Stat Cat Filter..." i18n-placeholder
+ [initialOrgId]="statCatFilter"
+ (onChange)="statCatFilter = $event ? $event.id() : null">
+ </eg-org-select>
+ </div>
+ </div>
+
<ng-container *ngIf="displayAttr('statcats')">
<div *ngFor="let cat of statCats()">
<ng-template #statCatTemplate>
loanDurationLabelMap: {[level: number]: string} = {};
fineLevelLabelMap: {[level: number]: string} = {};
+ statCatFilter: number;
+
@ViewChild('loanDurationShort', {static: false})
loanDurationShort: StringComponent;
@ViewChild('loanDurationNormal', {static: false})
) { }
ngOnInit() {
+ this.statCatFilter = this.volcopy.defaults.values.statcat_filter;
}
ngAfterViewInit() {
}
statCats(): IdlObject[] {
- return this.volcopy.commonData.acp_stat_cat;
+ if (this.statCatFilter) {
+ const orgs = this.org.descendants(this.statCatFilter, true);
+
+ return this.volcopy.commonData.acp_stat_cat.filter(
+ sc => orgs.includes(sc.owner()))
+
+ } else {
+
+ return this.volcopy.commonData.acp_stat_cat;
+ }
}