@can('appointments.manage-schedules') Add a session @endcan
@if (request()->hasAny(['doctor', 'department', 'day', 'state'])) Clear @endif
@foreach ($week as $day => $info)
{{ $info['label'] }} {{ $info['sessions'] }} session(s)
{{ $info['doctors'] }} consultant(s) · {{ $info['capacity'] }} token(s)
@endforeach
@if ($schedules->isEmpty())
@can('appointments.manage-schedules') Add a session @endcan
@else
@foreach ($schedules as $session) @php $window = \Illuminate\Support\Carbon::parse(substr((string) $session->start_time, 0, 5)) ->diffInMinutes(\Illuminate\Support\Carbon::parse(substr((string) $session->end_time, 0, 5))); $slots = $session->slot_duration_minutes > 0 ? intdiv($window, $session->slot_duration_minutes) : 0; @endphp @endforeach
Session Consultant Day Hours Slots Tokens Window State Actions
{{ $session->title }}
{{ $session->room ?: 'No room set' }} @if ($session->location) · {{ $session->location }} @endif
{{ $session->doctor?->name ?? '—' }}
{{ $session->department?->name ?? '—' }}
{{ substr((string) $session->start_time, 0, 5) }}–{{ substr((string) $session->end_time, 0, 5) }} {{ $slots }} × {{ $session->slot_duration_minutes }}min {{ $session->max_tokens }}
{{ $session->max_bookings_per_slot }}/slot
{{ $session->effective_from?->format('d M Y') ?? 'Open start' }}
to {{ $session->effective_to?->format('d M Y') ?? 'no end' }}
@if ($session->is_active) @else @endif @if ($session->allow_walk_ins)
Walk-ins allowed
@endif
Edit
@csrf @method('PATCH')
@csrf @method('DELETE')
@endif