diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-search/account-list-search.service.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-search/account-list-search.service.ts index 0e246ea685..88a5887267 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-search/account-list-search.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-search/account-list-search.service.ts @@ -11,7 +11,7 @@ export class AccountListSearchService extends ListSearchService { public constructor() { super( [`short_name`, `username`, `email`, `saml_id`, `member_number`, `externalString`, `homeCommitteeName`], - [] + [`first_name`] ); } } diff --git a/client/src/app/ui/modules/list/services/list-search.service.ts b/client/src/app/ui/modules/list/services/list-search.service.ts index df6ed82107..9dbcb5eb54 100644 --- a/client/src/app/ui/modules/list/services/list-search.service.ts +++ b/client/src/app/ui/modules/list/services/list-search.service.ts @@ -66,7 +66,10 @@ export class ListSearchService implements SearchService< return true; } - if (this.isIncludedInProperty(item, trimmedInput, this.alsoFilterByProperties)) { + if ( + this.isIncludedInProperty(item, trimmedInput, this.alsoFilterByProperties) || + this.isIncludedInProperty(item, trimmedInput, this.filterProps) + ) { return true; } @@ -88,7 +91,12 @@ export class ListSearchService implements SearchService< private isIncludedInProperty(item: V, trimmedInput: string, properties: string[]): boolean { if (properties.length > 0 && !!item[properties[0]]) { const propertyValueString = `` + item[properties[0]]; - const foundPropertyValue = propertyValueString.trim().toLowerCase().indexOf(trimmedInput) !== -1; + const foundPropertyValue = propertyValueString + .trim() + .toLowerCase() + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') + .includes(trimmedInput); if (foundPropertyValue) { return true; }