@php $mode = $mode ?? 'create'; $isEdit = $mode === 'edit'; $action = $isEdit ? route('admin.staff.update', $staff) : route('admin.staff.store'); $selectedServiceIds = collect(old('service_ids', $selectedServiceIds ?? []))->map(fn ($id) => (int) $id)->all(); $availabilityValue = old('availability_status', $staff->status === 'inactive' ? 'inactive' : ($staff->availability_status ?: 'available')); @endphp
@csrf @if ($isEdit) @method('PUT') @endif
@error('service_ids')

{{ $message }}

@enderror @if ($services->isNotEmpty())
@foreach ($services as $service) @endforeach
@else
Create services before assigning staff to them.
@endif
@if ($staff->avatar_url) {{ $staff->name }} @else
{{ $staff->initials }}

Upload profile image

Square JPG or PNG recommended

@endif
@error('avatar')

{{ $message }}

@enderror
Today appointments {{ $staff->today_appointments_count ?? 0 }}
This month {{ $staff->month_appointments_count ?? 0 }}
Rating {{ $staff->rating_display }}
{{ $isEdit ? 'Update Staff' : 'Save Staff' }} Cancel