Label multi-branch department picks and add searchable patients.
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:
isaacclad
2026-07-18 17:31:32 +00:00
co-authored by Cursor
parent 5a1d47b9cc
commit 2ac84faf73
10 changed files with 304 additions and 14 deletions
+16
View File
@@ -26,4 +26,20 @@ class Department extends Model
{
return $this->belongsTo(Branch::class, 'branch_id');
}
/**
* Select option label includes branch when set so multi-branch duplicates are distinguishable.
*/
public function labelForSelect(): string
{
$branch = $this->relationLoaded('branch')
? $this->branch
: $this->branch()->first();
if ($branch?->name) {
return $this->name.' — '.$branch->name;
}
return (string) $this->name;
}
}