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>
60 lines
3.7 KiB
PHP
60 lines
3.7 KiB
PHP
<x-app-layout title="Add practitioner">
|
|
<div class="mx-auto max-w-lg">
|
|
<h1 class="text-xl font-semibold text-slate-900">Add practitioner</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Creates a clinical listing for bookings. Invite them under Team if they also need to sign in.</p>
|
|
|
|
<form method="POST" action="{{ route('care.practitioners.store') }}" class="mt-6 space-y-4 rounded-2xl border border-slate-200 bg-white p-6">
|
|
@csrf
|
|
<div>
|
|
<label class="block text-sm font-medium">Name</label>
|
|
<input type="text" name="name" value="{{ old('name') }}" required class="mt-1 w-full rounded-lg border-slate-300 text-sm" placeholder="Dr. Ama Mensah">
|
|
@error('name')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium">Specialty (optional)</label>
|
|
<input type="text" name="specialty" value="{{ old('specialty') }}" class="mt-1 w-full rounded-lg border-slate-300 text-sm" placeholder="General practice">
|
|
</div>
|
|
<fieldset>
|
|
<legend class="block text-sm font-medium">Branches</legend>
|
|
<p class="mt-1 text-xs text-slate-500">Select every site this clinician may serve (including telemedicine). Nothing is selected by default.</p>
|
|
<div class="mt-2 space-y-2 rounded-lg border border-slate-200 p-3">
|
|
@forelse ($branches as $branch)
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="checkbox" name="branch_ids[]" value="{{ $branch->id }}"
|
|
@checked(collect(old('branch_ids', []))->contains($branch->id))
|
|
class="rounded border-slate-300 text-sky-600">
|
|
{{ $branch->name }}
|
|
</label>
|
|
@empty
|
|
<p class="text-sm text-slate-500">Create a branch first under Settings → Branches.</p>
|
|
@endforelse
|
|
</div>
|
|
@error('branch_ids')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
|
|
@error('branch_ids.*')<p class="mt-1 text-sm text-red-600">{{ $message }}</p>@enderror
|
|
</fieldset>
|
|
<div>
|
|
<label class="block text-sm font-medium">Department (optional)</label>
|
|
<select name="department_id" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">None</option>
|
|
@foreach ($departments as $department)
|
|
<option value="{{ $department->id }}" @selected(old('department_id') == $department->id)>{{ $department->labelForSelect() }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium">Link team member (optional)</label>
|
|
<select name="member_id" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
|
|
<option value="">No login linked</option>
|
|
@foreach ($members as $member)
|
|
<option value="{{ $member->id }}" @selected(old('member_id') == $member->id)>
|
|
{{ $member->user_ref }} · {{ config('care.roles.'.$member->role, $member->role) }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
<p class="mt-1 text-xs text-slate-500">Link after inviting them under Settings → Team.</p>
|
|
</div>
|
|
<button type="submit" class="btn-primary w-full">Save</button>
|
|
</form>
|
|
</div>
|
|
</x-app-layout>
|