Add hero sections to Patients, Appointments, Queue, and admin index pages.
Deploy Ladill Care / deploy (push) Successful in 37s
Deploy Ladill Care / deploy (push) Successful in 37s
Introduce shared x-care.page-hero with summary stats so key list views match the Ladill app hero pattern used across Frontdesk and Link. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -38,11 +38,26 @@ class AppointmentController extends Controller
|
||||
|
||||
$practitioners = $this->activePractitioners($request, $organization->id);
|
||||
|
||||
$owner = $this->ownerRef($request);
|
||||
$appointmentQuery = Appointment::owned($owner)
|
||||
->where('organization_id', $organization->id)
|
||||
->when($branchScope, fn ($q) => $q->where('branch_id', $branchScope));
|
||||
|
||||
$heroStats = [
|
||||
'today' => (clone $appointmentQuery)->whereDate('scheduled_at', today())->count(),
|
||||
'scheduled' => (clone $appointmentQuery)->where('status', Appointment::STATUS_SCHEDULED)->count(),
|
||||
'waiting' => (clone $appointmentQuery)->whereIn('status', [
|
||||
Appointment::STATUS_CHECKED_IN,
|
||||
Appointment::STATUS_WAITING,
|
||||
])->count(),
|
||||
];
|
||||
|
||||
return view('care.appointments.index', [
|
||||
'organization' => $organization,
|
||||
'appointments' => $appointments,
|
||||
'practitioners' => $practitioners,
|
||||
'statuses' => config('care.appointment_statuses'),
|
||||
'heroStats' => $heroStats,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user