@php $stats = $this->getStats(); $activeScope = $this->scope; @endphp {{-- Clickable stat cards — click to filter the table to that scope. --}}
@foreach($stats as $key => $stat) @php $isActive = $activeScope === $stat['scope']; $url = \App\Filament\Clusters\QA\Pages\Queue::getUrl(['scope' => $stat['scope']]); $colorVar = match($stat['color']) { 'warning' => 'var(--ag-gold)', 'danger' => 'var(--ag-crimson)', 'info' => 'var(--ag-blue)', 'success' => 'var(--ag-lime)', default => 'var(--ag-muted)', }; @endphp
{{ $stat['count'] }}
{{ $stat['label'] }}
@if($isActive)
Showing this queue below
@endif
@endforeach
@if($activeScope)
Showing {{ $this->getScopeLabel() }}. Clear filter
@endif
{{ $this->table }}