@include('admin.header')
@include('admin.topbar') @include('admin.leftbar')

Appointment List

Appointment Management
@if(!empty($appointment_array)) @php $i = 1; @endphp @foreach($appointment_array as $key => $list_data) @php $specilitiesName = CommonTrait::getSpecilitiesName($list_data->id); $paymentDetails = CommonTrait::getPaymentDetails($list_data->appointmentId); $patientInfo = json_decode($list_data->patient_info, true); $doctorInfo = json_decode($list_data->doctor_info, true); @endphp @php $i++ @endphp @endforeach @else @endif
# Booking Doctor Patient Amount Status Actions
{{ $i }}
{{ $list_data->booking_reference }}
{{ \Carbon\Carbon::parse($list_data->appointment_date)->format('d M Y') }}
{{ \Carbon\Carbon::parse($list_data->start_time)->format('h:i A') }} – {{ \Carbon\Carbon::parse($list_data->end_time)->format('h:i A') }}
{{ $list_data->consultation_mode }}
{{ $list_data->salutation }} {{ $list_data->first_name }} {{ $list_data->last_name }}
{{ $specilitiesName }}
{{ $list_data->phone ?? 'N/A' }}
{{ $list_data->email ?? 'N/A' }}
{{ $list_data->clinic_name ?? 'N/A' }}
{{ $patientInfo['data']['full_name'] ?? $list_data->patient_name }} @if(isset($patientInfo['data']['relation']) && strtolower($patientInfo['data']['relation']) !== 'self') ({{ ucfirst($patientInfo['data']['relation']) }}) @endif
{{ $patientInfo['data']['mobile'] ?? 'N/A' }}
@if(!empty($patientInfo['data']['age']) || !empty($patientInfo['data']['gender'])) {{ $patientInfo['data']['age'] ?? '' }}{{ !empty($patientInfo['data']['age']) ? ' yrs' : '' }}{{ !empty($patientInfo['data']['gender']) ? ' · ' . ucfirst($patientInfo['data']['gender']) : '' }} @endif @if(!empty($patientInfo['data']['relation_type']) && $patientInfo['data']['relation_type'] !== 'self')
{{ ucfirst($patientInfo['data']['relation_type']) }}
@endif
@if($paymentDetails) @php $payStatus = strtolower($paymentDetails?->payment_status ?? 'pending'); $payClass = match($payStatus) { 'success' => 'bg-success', 'pending' => 'bg-warning', 'failed' => 'bg-danger', 'refunded'=> 'bg-secondary', default => 'bg-warning', }; @endphp
₹{{ number_format($paymentDetails->final_amount ?? 0, 2) }}
{{ ucfirst($payStatus) }} @else No Data @endif
@php $status = strtolower($list_data->status); $badgeStyle = match($status) { 'requested' => 'background:#fef3c7;color:#92400e;border:1px solid #fde68a;', 'confirmed' => 'background:#dbeafe;color:#1d4ed8;border:1px solid #bfdbfe;', 'rejected' => 'background:#fee2e2;color:#b91c1c;border:1px solid #fecaca;', 'waiting' => 'background:#e0f2fe;color:#0369a1;border:1px solid #bae6fd;', 'ongoing' => 'background:#ede9fe;color:#7c3aed;border:1px solid #ddd6fe;', 'completed' => 'background:#dcfce7;color:#15803d;border:1px solid #bbf7d0;', 'cancelled' => 'background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;', 'rescheduled' => 'background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;', 'no_show', 'doctor_cancelled', 'patient_cancelled' => 'background:#fff1f2;color:#be123c;border:1px solid #fecdd3;', default => 'background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;', }; @endphp {{ ucwords(str_replace('_', ' ', $list_data->status)) }} @php $status = strtolower($list_data->status); @endphp
No Data Found
{{ $appointment_list->links('pagination::bootstrap-5') }}
@include('admin.footer')
Appointment Details
#
Appointment
Date
Time
Type
Mode
Patient
Name
Phone
Age / Gender
Blood
Email
Booked For
Payment
Total Paid
₹
Mode
Txn ID
Subtotal
₹
Discount
– ₹
@include('admin.scripts')