Label multi-branch department picks and add searchable patients.
Deploy Ladill Care / deploy (push) Successful in 27s
Deploy Ladill Care / deploy (push) Successful in 27s
Make appointment/practitioner department (and practitioner) options show branch names so duplicates are distinguishable, and replace the patient select with a searchable dropdown. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -276,10 +276,12 @@ class AppointmentController extends Controller
|
||||
->get();
|
||||
|
||||
$departments = Department::owned($ownerRef)
|
||||
->with('branch')
|
||||
->whereIn('branch_id', $branches->pluck('id'))
|
||||
->where('is_active', true)
|
||||
->orderBy('name')
|
||||
->get();
|
||||
->get()
|
||||
->sortBy(fn (Department $d) => strtolower(($d->branch?->name ?? '').' '.$d->name))
|
||||
->values();
|
||||
|
||||
return [
|
||||
'organization' => $organization,
|
||||
@@ -297,6 +299,7 @@ class AppointmentController extends Controller
|
||||
protected function activePractitioners(Request $request, int $organizationId)
|
||||
{
|
||||
return Practitioner::owned($this->ownerRef($request))
|
||||
->with(['branch', 'branches'])
|
||||
->where('organization_id', $organizationId)
|
||||
->where('is_active', true)
|
||||
->orderBy('name')
|
||||
|
||||
@@ -186,10 +186,12 @@ class PractitionerController extends Controller
|
||||
protected function activeDepartments(string $owner, int $organizationId)
|
||||
{
|
||||
return Department::owned($owner)
|
||||
->with('branch')
|
||||
->whereHas('branch', fn ($q) => $q->where('organization_id', $organizationId))
|
||||
->where('is_active', true)
|
||||
->orderBy('name')
|
||||
->get();
|
||||
->get()
|
||||
->sortBy(fn (Department $d) => strtolower(($d->branch?->name ?? '').' '.$d->name))
|
||||
->values();
|
||||
}
|
||||
|
||||
protected function linkableMembers(string $owner, int $organizationId)
|
||||
|
||||
Reference in New Issue
Block a user