diff --git a/app/Filament/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Resources/UserResource/Pages/ListUsers.php index 640b54ddd7..92021e4725 100644 --- a/app/Filament/Resources/UserResource/Pages/ListUsers.php +++ b/app/Filament/Resources/UserResource/Pages/ListUsers.php @@ -50,12 +50,13 @@ public function table(Table $table): Table ->label('2FA') ->visibleFrom('lg') ->icon(fn (User $user) => $user->use_totp ? 'tabler-lock' : 'tabler-lock-open-off') - ->boolean()->sortable(), - TextColumn::make('roles_count') - ->counts('roles') - ->icon('tabler-users-group') + ->boolean() + ->sortable(), + TextColumn::make('roles.name') ->label('Roles') - ->formatStateUsing(fn (User $user, $state) => $state . ($user->isRootAdmin() ? ' (Root Admin)' : '')), + ->badge() + ->icon('tabler-users-group') + ->placeholder('No roles'), TextColumn::make('servers_count') ->counts('servers') ->icon('tabler-server') @@ -65,7 +66,6 @@ public function table(Table $table): Table ->label('Subusers') ->counts('subusers') ->icon('tabler-users'), - // ->formatStateUsing(fn (string $state, $record): string => (string) ($record->servers_count + $record->subusers_count)) ]) ->actions([ EditAction::make(),