Update Appointment
{{-- success message --}} @if ($successMessage) @endif {{-- include full form here --}}
value?"disabled":""}} type="date" wire:model.lazy="date" class="form-control" id="dateInput" placeholder="">
value?"disabled":""}} type="time" wire:model.lazy="time" class="form-control" id="timeInput" placeholder="">
@if(isset($parent_visit_id))
@elseif(count($visits))
@endif
value?"disabled":""}} type="number" wire:model.lazy="amount_paid" class="form-control" id="amountPaidInput" placeholder="">
@error('to_be_followed_on') {{ $message }} @enderror
@error('note') {{ $message }} @enderror
{{--
--}} {{-- --}} {{-- --}} {{-- @error('follow_up') {{ $message }} @enderror--}} {{--
--}}
@error('complain') {{ $message }} @enderror
{{--
--}} {{-- --}} {{-- --}} {{-- @error('requirement_analysis') {{ $message }} @enderror--}} {{--
--}} {{-- @if(auth('client')->user()->position == 'doctor')--}} {{-- --}} {{--
--}} {{-- --}} {{-- --}} {{-- @error('diagnosis') {{ $message }} @enderror--}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{-- --}} {{-- @error('prescription') {{ $message }} @enderror--}} {{--
--}} {{-- @endif--}} {{-- --}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @foreach($existingDocuments as $d)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{-- @foreach($documents as $i => $file)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{-- --}} {{--
NameDateTypeViewDelete
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{--
--}}
@if($expanded)
Clinic Appointments
{{-- @if(!empty($reservedSlots))--}} {{--
--}} {{--
📅 Booked appointments for this day
--}} {{--
    --}} {{-- @foreach($reservedSlots as $slot)--}} {{--
  • --}} {{-- {{ \Carbon\Carbon::parse($slot['time'])->format('h:i A') }}--}} {{-- {{ $slot['patient'] }}--}} {{--
  • --}} {{-- @endforeach--}} {{--
--}} {{--
--}} {{-- @endif--}} @if(!empty($reservedSlots)) @php // التأكد من شكل الـ array إذا كانت Grouped by clinic or not $isGroupedByClinic = false; $first = collect($reservedSlots)->first(); if (is_array($first)) { $firstInner = reset($first); // نحاول نجيب أول عنصر داخلي $isGroupedByClinic = is_array($firstInner) && isset($firstInner[0]['time']); } @endphp
{{--
--}} {{-- --}} {{-- Appointments--}} {{--
--}} @if($isGroupedByClinic) {{-- ✅ Grouped by Clinic → Date --}} @foreach($reservedSlots as $clinic => $dates)
{{ $clinic }}
@foreach($dates as $date => $slots)
{{ \Carbon\Carbon::parse($date)->translatedFormat('l, d M Y') }}
@foreach($slots as $slot) @if(is_array($slot) && isset($slot['time'], $slot['patient']))
{{ \Carbon\Carbon::parse($slot['time'])->format('h:i A') }} {{ $slot['patient'] }}
@endif @endforeach
@endforeach
@endforeach @else {{-- ✅ Grouped by Date Only --}} @foreach($reservedSlots as $date => $slots)
{{ \Carbon\Carbon::parse($date)->translatedFormat('l, d M Y') }}
@foreach($slots as $slot) @if(is_array($slot) && isset($slot['patient']))
@if($slot['time']) {{ \Carbon\Carbon::parse($slot['time'])->format('h:i A') }} @else No time @endif {{ $slot['patient'] }}
@endif @endforeach
@endforeach @endif
@elseif(empty($reservedSlots) ) {{-- ✅ No Appointments Found --}}
No appointments found.
@endif @if(!empty($visitChain))
🔗 Visit chain
    @foreach($visitChain as $index => $visit)
  • @if($index == 0) 🟢 Original Visit: @else 🔁 Follow Up No. {{ $index }}: @endif {{ $visit->code }} | {{ $visit->date }} - {{ $visit->time }}
  • @endforeach
@endif
@endif
@push('js') @endpush