Add hero sections to Visits, Hosts, Employees, Devices, Branches, and Team index pages.
Deploy Ladill Frontdesk / deploy (push) Successful in 1m3s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-05 20:45:30 +00:00
co-authored by Cursor
parent 66299ae166
commit f995606649
13 changed files with 439 additions and 235 deletions
@@ -27,10 +27,23 @@ class DeviceController extends Controller
->orderBy('name')
->paginate(25);
$statsQuery = Device::owned($this->ownerRef($request))
->where('organization_id', $organization->id);
$heroStats = [
'total' => (clone $statsQuery)->count(),
'online' => (clone $statsQuery)
->where('status', 'online')
->where('last_online_at', '>=', now()->subMinutes(10))
->count(),
'kiosks' => (clone $statsQuery)->where('type', 'kiosk')->count(),
];
return view('frontdesk.devices.index', [
'organization' => $organization,
'devices' => $devices,
'deviceTypes' => config('frontdesk.device_types'),
'heroStats' => $heroStats,
'canManage' => app(\App\Services\Frontdesk\FrontdeskPermissions::class)
->can($this->member($request), 'devices.manage'),
]);