diff --git a/app/Filament/Resources/TenantResource.php b/app/Filament/Resources/TenantResource.php index 9153efc..40a635c 100644 --- a/app/Filament/Resources/TenantResource.php +++ b/app/Filament/Resources/TenantResource.php @@ -248,12 +248,37 @@ public static function infolist(Schema $schema): Schema Infolists\Components\TextEntry::make('tenant_id')->label('Tenant ID')->copyable(), Infolists\Components\TextEntry::make('domain')->copyable(), Infolists\Components\TextEntry::make('app_client_id')->label('App Client ID')->copyable(), - Infolists\Components\TextEntry::make('status')->badge(), - Infolists\Components\TextEntry::make('app_status')->badge(), + Infolists\Components\TextEntry::make('status') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'active' => 'success', + 'inactive' => 'gray', + 'suspended' => 'warning', + 'error' => 'danger', + default => 'gray', + }), + Infolists\Components\TextEntry::make('app_status') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'ok', 'configured' => 'success', + 'pending' => 'warning', + 'error' => 'danger', + 'requires_consent' => 'warning', + default => 'gray', + }), Infolists\Components\TextEntry::make('app_notes')->label('Notes'), Infolists\Components\TextEntry::make('created_at')->dateTime(), Infolists\Components\TextEntry::make('updated_at')->dateTime(), - Infolists\Components\TextEntry::make('rbac_status')->label('RBAC status')->badge(), + Infolists\Components\TextEntry::make('rbac_status') + ->label('RBAC status') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'ok', 'configured' => 'success', + 'manual_assignment_required' => 'warning', + 'error', 'failed' => 'danger', + 'not_configured' => 'gray', + default => 'gray', + }), Infolists\Components\TextEntry::make('rbac_status_reason')->label('RBAC reason'), Infolists\Components\TextEntry::make('rbac_last_checked_at')->label('RBAC last checked')->since(), Infolists\Components\TextEntry::make('rbac_role_display_name')->label('RBAC role'), diff --git a/resources/views/filament/infolists/entries/rbac-summary.blade.php b/resources/views/filament/infolists/entries/rbac-summary.blade.php index 03a16e0..0c4cf37 100644 --- a/resources/views/filament/infolists/entries/rbac-summary.blade.php +++ b/resources/views/filament/infolists/entries/rbac-summary.blade.php @@ -48,11 +48,18 @@ @if (empty($canaries))
No canary results recorded.
@else -