@extends('doctorpanel.layout.app') @section('title', 'Appointment Details | Waiting Room') @section('content')
@php $startTime = \Carbon\Carbon::createFromFormat('H:i', $booking->start_time)->format('g:i A'); $endTime = \Carbon\Carbon::createFromFormat('H:i', $booking->end_time)->format('g:i A'); @endphp

{{ __('translations.Appointment Details') }}

{{ __('translations.Back') }}
{{ __('translations.Appointment Info') }}
  • {{__('translations.Date')}}: {{ Carbon\Carbon::parse($booking->date)->format('j F, Y') }}
  • {{ __('translations.Time Slot') }}: {{ $startTime }} - {{ $endTime }}
  • {{ __('translations.Fees') }}: {{ $booking->total_amount }}
  • {{ __('Queue No') }}: {{ $booking->ticket }}
  • {{ __('translations.Status') }}: {{ ucfirst($booking->status) }}
{{ __('translations.Doctor Info') }}
  • {{ __('translations.Doctor Name') }}: {{ $booking->Doctor->name }}
  • {{ __('translations.Location') }}: {{ $booking->Doctor->location }}
  • {{ __('translations.Specializations') }}: {{ $booking->Doctor->specialities->pluck('name')->implode(', ') }}
  • {{ __('translations.Email') }}: {{ $booking->Doctor->email }}
{{ __('translations.Patient Info') }}
  • {{ __('translations.Patient Name') }}: {{ $booking->getUser->first_name . ' ' . $booking->getUser->last_name }}
  • {{ __('translations.Email') }}: {{ $booking->getUser->email }}
  • {{ __('translations.Phone') }}: {{ $booking->getUser->country_code . $booking->getUser->phone }}
{{ __('translations.Doctor Appointment History') }}
@if ($appointmentHistory->isEmpty())

{{ __('translations.No past appointments found for this patient with the same doctor.') }}

@else @foreach ($appointmentHistory as $history) @php // Set the badge class based on the appointment status $badgeClass = match ($history->status) { 'completed' => 'success', 'cancel' => 'danger', 'absent' => 'secondary', 'pending' => 'warning', 'in_progress' => 'light-info', default => 'secondary', // Fallback class for unexpected status }; @endphp
  • {{ __('translations.Date') }}: {{ Carbon\Carbon::parse($history->date)->format('j F, Y') }}
  • {{ __('translations.Patient') }}: {{ $history->getUser->first_name . ' ' . $history->getUser->last_name }}
  • {{ __('translations.Status') }}: {{ ucfirst($history->status === 'cancel' ? 'cancelled' : $history->status) }}
@endforeach {{-- --}} @endif
{{ __('translations.Patient Appointment History') }}
@if ($appointmentUserHistory->isEmpty())

{{ __('translations.No Patient Appointment History found.') }}

@else @foreach ($appointmentUserHistory as $uHistory) @php // Set the badge class based on the appointment status $badgeClass = match ($uHistory->status) { 'completed' => 'success', 'cancel' => 'danger', 'absent' => 'secondary', 'pending' => 'warning', 'in_progress' => 'light-info', default => 'secondary', // Fallback class for unexpected status }; @endphp
  • {{ __('translations.Date') }}: {{ Carbon\Carbon::parse($uHistory->date)->format('j F, Y') }}
  • {{ __('translations.Doctor') }}: {{ $uHistory->Doctor->name }}
  • {{ __('translations.Specializations') }}: {{ $uHistory->Doctor->specialities->pluck('name')->join(', ') }}
  • {{ __('translations.Status') }}: {{ ucfirst($uHistory->status) }}
@endforeach @endif {{-- --}}
@endsection @section('custom-script') @endsection