-<eg-title i18n-prefix prefix="Org Unit Settings Editor"></eg-title>
-<eg-staff-banner bannerText="Org Unit Settings Config" i18n-bannerText></eg-staff-banner>
+<eg-title i18n-prefix prefix="Library Settings Editor"></eg-title>
+<eg-staff-banner bannerText="Library Settings Editor" i18n-bannerText></eg-staff-banner>
<!-- org unit selector -->
<eg-admin-edit-org-unit-setting-dialog #editOuSettingDialog>
class="form-control"
[(ngModel)]="filterString"
(blur)="applyFilter()"
+ (keydown.enter)="$event.target.blur()"
aria-label="Filter Settings"
i18n-aria-label
/>
import {GridDataSource} from '@eg/share/grid/grid';
import {GridComponent} from '@eg/share/grid/grid.component';
import {ToastService} from '@eg/share/toast/toast.service';
+import {LocaleService} from '@eg/core/locale.service';
import {EditOuSettingDialogComponent
} from '@eg/staff/admin/local/org-unit-settings/edit-org-unit-setting-dialog.component';
private pcrud: PcrudService,
private auth: AuthService,
private toast: ToastService,
+ private locale: LocaleService,
private net: NetService,
) {
this.gridDataSource = new GridDataSource();
applyFilter(clear?: boolean) {
if (clear) { this.filterString = ''; }
+ this.orgUnitSettingsGrid.context.pager.toFirst()
this.updateGrid(this.contextOrg);
}
const tempGrid = this.settingTypeArr;
tempGrid.forEach(row => {
const containsString =
- row.name.includes(this.filterString) ||
- row.label.includes(this.filterString) ||
- (row.grp && row.grp.includes(this.filterString)) ||
- (row.description && row.description.includes(this.filterString));
+ row.name.toLocaleLowerCase(this.locale.currentLocaleCode())
+ .includes(this.filterString.toLocaleLowerCase(this.locale.currentLocaleCode())) ||
+ row.label.toLocaleLowerCase(this.locale.currentLocaleCode())
+ .includes(this.filterString.toLocaleLowerCase(this.locale.currentLocaleCode())) ||
+ (row.grp && row.grp.toLocaleLowerCase(this.locale.currentLocaleCode())
+ .includes(this.filterString.toLocaleLowerCase(this.locale.currentLocaleCode()))) ||
+ (row.description && row.description.toLocaleLowerCase(this.locale.currentLocaleCode())
+ .includes(this.filterString.toLocaleLowerCase(this.locale.currentLocaleCode())));
if (containsString) {
this.gridDataSource.data.push(row);
}