feat: implement services overview page with service status cards and counts

This commit is contained in:
2025-12-20 16:31:06 -05:00
parent ed75b77b06
commit 8a108e9604
6 changed files with 387 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Admin\Clusters\Services\Pages;
use App\Admin\Clusters\Services;
use App\Models\Service;
use Filament\Pages\Page;
class ServicesOverview extends Page
{
protected static ?string $navigationIcon = 'ri-dashboard-line';
protected static ?string $activeNavigationIcon = 'ri-dashboard-fill';
protected static ?string $navigationLabel = 'Overview';
protected static ?int $navigationSort = -1;
protected static ?string $cluster = Services::class;
protected static string $view = 'admin.clusters.services.pages.services-overview';
public function getViewData(): array
{
return [
'activeCount' => Service::where('status', 'active')->count(),
'pendingCount' => Service::where('status', 'pending')->count(),
'suspendedCount' => Service::where('status', 'suspended')->count(),
'cancelledCount' => Service::where('status', 'cancelled')->count(),
'totalCount' => Service::count(),
];
}
}