user listing fix

This commit is contained in:
Efstratios Giannopoulos 2024-06-14 15:41:11 +03:00
parent 4253727f8e
commit a056c8fd1d
1 changed files with 10 additions and 4 deletions

View File

@ -50,13 +50,19 @@ export class UserListingFiltersComponent extends BaseComponent implements OnInit
}
protected applyFilters(): void {
const { isActive, like, userRoleSubQuery } = this.internalFilters ?? {}
this.filterChange.emit({
const { isActive, like, userRoleSubQuery } = this.internalFilters ?? {};
let filter = {
...this.filter,
like,
isActive: isActive ? [IsActive.Active] : [IsActive.Inactive],
userRoleSubQuery
})
}
if (userRoleSubQuery && userRoleSubQuery.roles != null && userRoleSubQuery.roles.length > 0) {
filter = {
...filter,
userRoleSubQuery
}
}
this.filterChange.emit(filter);
}