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
@@ -42,7 +42,17 @@ class VisitController extends Controller
->paginate(25)
->withQueryString();
return view('frontdesk.visits.index', compact('visits', 'organization'));
$statsQuery = Visit::owned($this->ownerRef($request))
->where('organization_id', $organization->id);
$this->scopeToBranch($request, $statsQuery);
$heroStats = [
'on_site' => (clone $statsQuery)->whereIn('status', Visit::ACTIVE_STATUSES)->count(),
'today' => (clone $statsQuery)->whereDate('checked_in_at', today())->count(),
'total' => (clone $statsQuery)->count(),
];
return view('frontdesk.visits.index', compact('visits', 'organization', 'heroStats'));
}
public function calendar(Request $request): View