diff --git a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts index 95a6cded1..783f2c31c 100644 --- a/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/user-listing/user-listing-screen.component.ts @@ -19,7 +19,6 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; providers: [...DefaultListingServices] }) export class UserListingScreenComponent extends ListingComponent implements OnInit { - protected readonly _primaryKey = 'id'; readonly translations = rolesTranslations; readonly iconButtonTypes = IconButtonTypes; readonly circleButtonTypes = CircleButtonTypes; @@ -32,9 +31,9 @@ export class UserListingScreenComponent extends ListingComponent im { label: _('user-listing.table-col-names.active'), class: 'flex-center' }, { label: _('user-listing.table-col-names.roles') } ]; - collapsedDetails = false; chartData: DoughnutChartConfig[] = []; + protected readonly _primaryKey = 'id'; @ViewChildren(InitialsAvatarComponent) private readonly _avatars: QueryList; @@ -52,7 +51,7 @@ export class UserListingScreenComponent extends ListingComponent im private get _canDeleteSelected$(): Observable { const entities$ = this.entitiesService.selected$; - return entities$.pipe(map(all => all.indexOf(this.currentUser) === -1)); + return entities$.pipe(map(all => !all.find(u => u.id === this.currentUser.id))); } async ngOnInit() {