@php $summaryCards = [ [ 'label' => __('Questions Approved'), 'value' => $this->totalQuestionsApproved(), 'icon' => 'heroicon-o-check-badge', 'gradient' => 'from-emerald-400 to-teal-600', // Explicit `panel: 'staff'` rather than relying on // Filament::getCurrentPanel() — that ambient state isn't // set when this page is rendered outside a real HTTP // request (e.g. Livewire-component-only tests), which // resolved this to the wrong (default) panel's route. 'url' => \App\Filament\Staff\Pages\ApprovedQuestionsBreakdown::getUrl(panel: 'staff'), ], [ 'label' => __('Questions Pending'), 'value' => $this->pendingQuestionsCount(), 'icon' => 'heroicon-o-clock', 'gradient' => 'from-amber-400 to-orange-500', 'url' => \App\Filament\Staff\Pages\PendingQuestionsBreakdown::getUrl(panel: 'staff'), ], [ 'label' => __('Total Earned'), 'value' => '৳'.number_format($this->totalEarned(), 2), 'icon' => 'heroicon-o-banknotes', 'gradient' => 'from-sky-400 to-blue-600', 'url' => \App\Filament\Staff\Pages\MonthlyEarnings::getUrl(panel: 'staff'), ], [ 'label' => __('Total Paid'), 'value' => '৳'.number_format($this->totalPaid(), 2), 'icon' => 'heroicon-o-wallet', 'gradient' => 'from-fuchsia-400 to-purple-600', 'url' => \App\Filament\Staff\Pages\PayoutHistory::getUrl(panel: 'staff'), ], ]; @endphp
@foreach ($summaryCards as $card) <{{ isset($card['url']) ? 'a' : 'div' }} @if (isset($card['url'])) href="{{ $card['url'] }}" wire:navigate class="group relative overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-sm transition hover:-translate-y-0.5 hover:shadow-lg dark:border-white/10 dark:bg-gray-900" @else class="relative overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-sm dark:border-white/10 dark:bg-gray-900" @endif >
{{ $card['label'] }}

{{ $card['value'] }}

@if (isset($card['url'])) @endif
@endforeach
{{ __('Subject-wise breakdown') }} @forelse ($this->subjectBreakdown() as $row) @empty @endforelse
{{ __('Class') }} {{ __('Subject') }} {{ __('Approved questions') }} {{ __('Earned') }}
{{ $row['class'] }} {{ $row['subject'] }} {{ $row['count'] }} ৳{{ number_format($row['total'], 2) }}
{{ __('No earnings yet.') }}
{{ __('Bank / mobile banking info') }}
{{ $this->form }} {{ __('Save') }}