filters['startDate'] ?? null; $endDate = $this->filters['endDate'] ?? null; return [ Stat::make('Total Perusahaan', Company::when($startDate, fn ($q) => $q->whereDate('created_at', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('created_at', '<=', $endDate)) ->count()) ->description('Perusahaan terdaftar') ->descriptionIcon(Heroicon::BuildingOffice2) ->color('primary'), Stat::make('Media Terverifikasi', PartnerMedia::approved() ->when($startDate, fn ($q) => $q->whereDate('created_at', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('created_at', '<=', $endDate)) ->count()) ->description('Media aktif') ->descriptionIcon(Heroicon::CheckBadge) ->color('success'), Stat::make('Total Jurnalis', Journalist::when($startDate, fn ($q) => $q->whereDate('created_at', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('created_at', '<=', $endDate)) ->count()) ->description('Jurnalis terdaftar') ->descriptionIcon(Heroicon::Identification) ->color('info'), Stat::make('Antrean Verifikasi', VerificationRequest::pending() ->when($startDate, fn ($q) => $q->whereDate('created_at', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('created_at', '<=', $endDate)) ->count()) ->description('Butuh tindakan') ->descriptionIcon(Heroicon::PencilSquare) ->color('warning'), Stat::make('Antrean Perubahan', DataChangeRequest::pending() ->when($startDate, fn ($q) => $q->whereDate('created_at', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('created_at', '<=', $endDate)) ->count()) ->description('Perubahan data') ->descriptionIcon(Heroicon::DocumentText) ->color('warning'), Stat::make('Total Pengunjung', Visitor::when($startDate, fn ($q) => $q->whereDate('date', '>=', $startDate)) ->when($endDate, fn ($q) => $q->whereDate('date', '<=', $endDate)) ->count()) ->description('Total traffic') ->descriptionIcon(Heroicon::ChartBar) ->color('info'), ]; } }