-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/assets 387 umbau user UI uebersicht #408
Conversation
d297b73
to
774db20
Compare
libs/client-shared/src/lib/components/filter-selector/filter-selector.component.ts
Outdated
Show resolved
Hide resolved
libs/client-shared/src/lib/components/filter-selector/filter-selector.component.ts
Outdated
Show resolved
Hide resolved
libs/client-shared/src/lib/components/search-input/search-input.component.html
Outdated
Show resolved
Hide resolved
libs/client-shared/src/lib/components/filter-selector/filter-selector.component.ts
Outdated
Show resolved
Hide resolved
libs/client-shared/src/lib/components/filter-selector/filter-selector.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash them commits!
@@ -85,18 +85,19 @@ export class UsersComponent implements OnInit, OnDestroy, AfterViewInit { | |||
this.activeFilters$.next(activeFilters); | |||
} | |||
|
|||
private filterUsersBySearchTerm(user: User, searchTerm: string) { | |||
private matchUsersBySearchTerm(user: User, searchTerm: string): boolean { | |||
const searchTermLowerCase = searchTerm.toLowerCase(); | |||
return Object.entries(user).some(([key, value]) => { | |||
if (key === 'roles') { | |||
return Array.from((value as Map<number, string>).keys()).some((id) => | |||
this.workgroups.get(id)?.name.toLowerCase().includes(searchTerm.toLowerCase()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.workgroups.get(id)?.name.toLowerCase().includes(searchTerm.toLowerCase()) | |
this.workgroups.get(id)?.name.toLowerCase().includes(searchTermLowerCase) |
@@ -85,18 +85,19 @@ export class UsersComponent implements OnInit, OnDestroy, AfterViewInit { | |||
this.activeFilters$.next(activeFilters); | |||
} | |||
|
|||
private filterUsersBySearchTerm(user: User, searchTerm: string) { | |||
private matchUsersBySearchTerm(user: User, searchTerm: string): boolean { | |||
const searchTermLowerCase = searchTerm.toLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could just reuse the same variable, but its up to you :)
const searchTermLowerCase = searchTerm.toLowerCase(); | |
searchTerm = searchTerm.toLowerCase(); |
9fbc0bc
to
f9e085b
Compare
|
resolves #387