Fixed can delete selected users
This commit is contained in:
parent
740cd5fb89
commit
cf44419a88
@ -19,7 +19,6 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
providers: [...DefaultListingServices]
|
||||
})
|
||||
export class UserListingScreenComponent extends ListingComponent<UserWrapper> implements OnInit {
|
||||
protected readonly _primaryKey = 'id';
|
||||
readonly translations = rolesTranslations;
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly circleButtonTypes = CircleButtonTypes;
|
||||
@ -32,9 +31,9 @@ export class UserListingScreenComponent extends ListingComponent<UserWrapper> 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<InitialsAvatarComponent>;
|
||||
|
||||
@ -52,7 +51,7 @@ export class UserListingScreenComponent extends ListingComponent<UserWrapper> im
|
||||
|
||||
private get _canDeleteSelected$(): Observable<boolean> {
|
||||
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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user