{{-- appointments/index.blade.php --}} @extends('patient.layouts.app') @section('title','مواعيدي') @section('content') @if($upcoming->isNotEmpty())
المواعيد القادمة
@foreach($upcoming as $appt)
{{ $appt->appointment_date->format('d') }}
{{ $appt->appointment_date->locale('ar')->isoFormat('MMM') }}
د. {{ $appt->doctor->user->name }}
{{ $appt->doctor->specialty }}
🕐 {{ $appt->appointment_time }}
@if($appt->reason)
📝 {{ $appt->reason }}
@endif
@if($appt->status==='confirmed') مؤكد @else بانتظار @endif @if(in_array($appt->status,['pending','confirmed']))
@csrf @method('DELETE')
@endif
@endforeach @endif @if($past->isNotEmpty())
المواعيد السابقة
@foreach($past as $appt)
د. {{ $appt->doctor->user->name }}
{{ $appt->appointment_date->format('Y/m/d') }} · {{ $appt->appointment_time }}
@php $statusMap=['completed'=>['#d1fae5','#065f46','منتهي'],'cancelled'=>['#fee2e2','#991b1b','ملغي'],'no_show'=>['#e5e7eb','#374151','لم يحضر']]; [$bg,$cl,$lb]=$statusMap[$appt->status]??['#e5e7eb','#374151',$appt->status]; @endphp {{ $lb }}
@endforeach @if($past->hasPages())
{{ $past->links('pagination::bootstrap-5') }}
@endif @endif @if($upcoming->isEmpty() && $past->isEmpty())

لا توجد مواعيد بعد

ابحث عن طبيب
@endif @endsection