Book Your Appointment

Schedule your antenatal care appointment at your assigned clinic

If you see a success message, Livewire is working!
@if($activeTab === 'book')

Your Assigned Clinic

View your clinic location and details

{{ auth()->user()->clinic->name }}

Address

{{ auth()->user()->clinic->address }}

@if(auth()->user()->clinic->phone)

Phone

{{ auth()->user()->clinic->phone }}

@endif @if(auth()->user()->clinic->email)

Email

{{ auth()->user()->clinic->email }}

@endif
@if(auth()->user()->clinic->lat && auth()->user()->clinic->lng) Get Directions @endif Change Clinic

You can only book appointments at your assigned clinic

Select Appointment Date

Choose your preferred appointment date (weekdays only)

@if($selectedDate)

Selected: {{ \Carbon\Carbon::parse($selectedDate)->format('l, F j, Y') }}

@else

Please select a date to view available time slots

@endif
@if($selectedDate)

Available Time Slots

Choose your preferred appointment time for {{ \Carbon\Carbon::parse($selectedDate)->format('l, F j, Y') }}

@if(count($availableSlots) > 0) @php $morningSlots = collect($availableSlots)->filter(function($quota, $timeSlot) { return in_array($timeSlot, ['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00']); }); @endphp @if($morningSlots->count() > 0)

Morning Session

8:00 AM - 12:00 PM

@foreach(['08:00-09:00', '09:00-10:00', '10:00-11:00', '11:00-12:00'] as $timeSlot) @if(isset($availableSlots[$timeSlot])) @php $quota = $availableSlots[$timeSlot]; @endphp
{{ str_replace('-', ' - ', $timeSlot) }}
{{ $quota->available_slots }} slots available
@else
{{ str_replace('-', ' - ', $timeSlot) }}
Unavailable
@endif @endforeach
@endif @php $afternoonSlots = collect($availableSlots)->filter(function($quota, $timeSlot) { return in_array($timeSlot, ['12:00-13:00', '13:00-14:00']); }); @endphp @if($afternoonSlots->count() > 0)

Afternoon Session

12:00 PM - 2:00 PM

@foreach(['12:00-13:00', '13:00-14:00'] as $timeSlot) @if(isset($availableSlots[$timeSlot])) @php $quota = $availableSlots[$timeSlot]; @endphp
{{ str_replace('-', ' - ', $timeSlot) }}
{{ $quota->available_slots }} slots available
@else
{{ str_replace('-', ' - ', $timeSlot) }}
Unavailable
@endif @endforeach
@endif @php $eveningSlots = collect($availableSlots)->filter(function($quota, $timeSlot) { return in_array($timeSlot, ['14:00-15:00', '15:00-16:00', '16:00-17:00']); }); @endphp @if($eveningSlots->count() > 0)

Evening Session

2:00 PM - 5:00 PM

@foreach(['14:00-15:00', '15:00-16:00', '16:00-17:00'] as $timeSlot) @if(isset($availableSlots[$timeSlot])) @php $quota = $availableSlots[$timeSlot]; @endphp
{{ str_replace('-', ' - ', $timeSlot) }}
{{ $quota->available_slots }} slots available
@else
{{ str_replace('-', ' - ', $timeSlot) }}
Unavailable
@endif @endforeach
@endif @else

No Available Slots

There are no available time slots for the selected date. Please choose another date.

@endif
@endif @endif @if($activeTab === 'history')
@forelse($appointments as $appointment)

{{ $appointment->slot_label ?? 'Time Slot' }} - {{ $appointment->date->format('M d, Y') }}

@if($appointment->status === 'completed') Completed @elseif($appointment->status === 'confirmed') Confirmed @elseif($appointment->status === 'cancelled') Cancelled @else {{ ucfirst($appointment->status) }} @endif

Date: {{ \Carbon\Carbon::parse($appointment->date)->format('l, F j, Y') }}

Time Slot: {{ $appointment->slot_label ?? 'Not specified' }}

@if($appointment->assignedNurse)
@if($appointment->assignedNurse->profile_picture) {{ $appointment->assignedNurse->name }} @else
@endif

Nurse: {{ $appointment->assignedNurse->name }}

@endif

Clinic: {{ $appointment->clinic->name }}

@if($appointment->status === 'confirmed' && $appointment->date->isFuture())
@endif
@empty

No Appointments Yet

You haven't booked any appointments yet. Click on "Book Appointment" to schedule your first appointment.

@endforelse
{{ $appointments->links() }}
@endif
@if($showBookingModal)

Book Appointment

Appointment Details

Date: {{ \Carbon\Carbon::parse($selectedDate)->format('l, F j, Y') }}

Time Slot: {{ $timeSlots[$selectedTimeSlot] ?? $selectedTimeSlot }}

Nurse: Auto-assigned from your zone

A nurse will be automatically assigned based on your location zone

@error('notes')

{{ $message }}

@enderror

Maximum 500 characters

@endif
@push('styles') @endpush @push('scripts') @endpush