fix: Adjust 'Media Terverifikasi' count to reflect company's approved verification status in the OverviewStats widget.
This commit is contained in:
parent
ca912e5d6a
commit
01fe159d52
@ -45,7 +45,9 @@ protected function getStats(): array
|
|||||||
->descriptionIcon(Heroicon::BuildingOffice2)
|
->descriptionIcon(Heroicon::BuildingOffice2)
|
||||||
->color('primary'),
|
->color('primary'),
|
||||||
|
|
||||||
Stat::make('Media Terverifikasi', PartnerMedia::approved()
|
Stat::make('Media Terverifikasi', PartnerMedia::whereHas('company.verificationRequest', function ($q) {
|
||||||
|
$q->approved();
|
||||||
|
})
|
||||||
->when($startDate, fn($q) => $q->whereDate('created_at', '>=', $startDate))
|
->when($startDate, fn($q) => $q->whereDate('created_at', '>=', $startDate))
|
||||||
->when($endDate, fn($q) => $q->whereDate('created_at', '<=', $endDate))
|
->when($endDate, fn($q) => $q->whereDate('created_at', '<=', $endDate))
|
||||||
->count())
|
->count())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user