Appointments Management

@if (session()->has('message'))
{{ session('message') }}
@endif
@if($viewMode === 'calendar')

{{ $calendarMonthName }}

@foreach(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as $day)
{{ $day }}
@endforeach
@foreach($calendarDays as $dayData) @if($dayData === null)
@else @php $day = $dayData['day']; $date = $dayData['date']; $dayAppointments = $dayData['appointments']; $isToday = $date->isToday(); $isPast = $date->isPast() && !$date->isToday(); @endphp
count() > 0) wire:click="$dispatch('open-appointment-day', { date: '{{ $date->format('Y-m-d') }}' })" @endif>
{{ $day }} @if($dayAppointments->count() > 0) {{ $dayAppointments->count() }} @endif
@foreach($dayAppointments->take(3) as $apt)
{{ \Carbon\Carbon::parse($apt->appointment_time)->format('h:i') }} - {{ $apt->isGuest() ? explode(' ', $apt->guest_name)[0] : ($apt->patient ? $apt->patient->first_name : 'N/A') }}
@endforeach @if($dayAppointments->count() > 3)
+{{ $dayAppointments->count() - 3 }} more
@endif
@endif @endforeach
@else
@forelse ($appointments as $appointment) @empty @endforelse
Patient Doctor Date & Time Duration Type Status Actions
{{ $appointment->patient_name }}
@if($appointment->isGuest())
Guest @if($appointment->guest_phone) {{ $appointment->guest_phone }} @endif
@elseif($appointment->patient)
{{ $appointment->patient->patient_id }}
@endif
{{ ucwords(strtolower($appointment->doctor->name)) }} {{ $appointment->appointment_date->format('M d, Y') }}
{{ \Carbon\Carbon::parse($appointment->appointment_time)->format('h:i A') }}
{{ $appointment->duration }} min {{ ucfirst(str_replace('_', ' ', $appointment->type)) }} {{ ucfirst(str_replace('_', ' ', $appointment->status)) }}
@if(auth()->user()->isFrontDesk() && $appointment->status === 'scheduled' && !$appointment->checked_in_at) @endif
No appointments found
{{ $appointments->links() }}
@endif
@if($showCreateModal || $showEditModal)

{{ $editingAppointment ? 'Edit Appointment' : 'New Appointment' }}

@if($is_guest)
@else
@if(count($searchResults) > 0 && !$patient_id)
@foreach($searchResults as $patient) @endforeach
@endif
@if($patient_id)
✓ Patient selected
@endif
@endif
@endif