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:
@@ -33,7 +33,18 @@ class PatientController extends Controller
|
||||
$branchScope,
|
||||
);
|
||||
|
||||
return view('care.patients.index', compact('patients', 'organization'));
|
||||
$owner = $this->ownerRef($request);
|
||||
$patientQuery = Patient::owned($owner)
|
||||
->where('organization_id', $organization->id)
|
||||
->when($branchScope, fn ($q) => $q->where('branch_id', $branchScope));
|
||||
|
||||
$heroStats = [
|
||||
'total' => (clone $patientQuery)->count(),
|
||||
'new_this_month' => (clone $patientQuery)->where('created_at', '>=', now()->startOfMonth())->count(),
|
||||
'with_visits' => (clone $patientQuery)->whereHas('appointments')->count(),
|
||||
];
|
||||
|
||||
return view('care.patients.index', compact('patients', 'organization', 'heroStats'));
|
||||
}
|
||||
|
||||
public function create(Request $request): View
|
||||
|
||||
Reference in New Issue
Block a user