@extends('web_site.account.layout') @php $doctor = $booking->doctor; $isOnline = $booking->type === 'online'; $isUpcoming = in_array($booking->status, \App\Models\Clinic\Booking::UPCOMING_STATUSES, true) && $booking->scheduled_at->isFuture(); $isPaid = $booking->payment?->status === 'paid'; $publishedRecord = $booking->medicalRecord?->published_at ? $booking->medicalRecord : null; $canReview = $booking->status === 'completed' && ! $booking->review; $paymentLabel = $isPaid ? trans('site.bookings.paid_online') : ($booking->status === 'pending' ? trans('site.bookings.awaiting_payment') : trans('site.bookings.pay_at_clinic')); @endphp @section('account_title', trans('site.bookings.details_title')) @section('account_content')
{{ trans('clinic.bookings.statuses.'.$booking->status) }}
{{ $doctor->name }}

{{ $doctor->name }}

{{ $doctor->specialty?->name }}
@unless ($isOnline) @endunless
{{ trans('site.bookings.type') }}{{ trans('clinic.bookings.'.$booking->type) }}
{{ trans('site.bookings.date') }}{{ $booking->scheduled_at->translatedFormat('l j F Y') }}
{{ trans('site.bookings.time') }}{{ $booking->scheduled_at->translatedFormat('h:i A') }}
{{ trans('site.bookings.place') }}{{ $booking->clinicProfile?->name }}@if ($booking->clinicProfile?->branch) — {{ $booking->clinicProfile->branch->name }}@endif
{{ trans('site.bookings.payment') }}{{ $paymentLabel }}
{{ trans('site.bookings.total') }}{{ number_format((float) $booking->price, 0) }} {{ trans('site.bookings.currency') }}
@if ($isOnline && $isUpcoming)
{{ trans('site.bookings.online_note') }}
@endif @if ($booking->followup?->is_required && $booking->followup->status === 'pending')
{{ trans('site.bookings.followup_title') }} @if ($booking->followup->due_date) {{ trans('site.bookings.followup_due', ['date' => $booking->followup->due_date->translatedFormat('j F Y')]) }} — @endif {{ trans('site.bookings.followup_contact') }}
@endif @if ($booking->review)
{{ trans('site.bookings.your_review') }} @for ($i = 1; $i <= 5; $i++)@endfor @if ($booking->review->doctor_comment)

{{ $booking->review->doctor_comment }}

@endif
@endif
@if ($booking->status === 'pending' && ! $isPaid) {{ trans('site.bookings.pay') }} @endif @if ($publishedRecord) {{ trans('site.bookings.report') }} @endif @if ($canReview) @endif @if ($canReschedule) {{ trans('site.bookings.reschedule') }} @endif @if ($canCancel) @endif
@if ($isUpcoming)

@if ($canCancel) {{ trans('site.bookings.cancel_policy', ['hours' => $cancelHours]) }} @else {{ trans('site.bookings.cancel_closed', ['hours' => $cancelHours]) }} @endif

@endif
@if ($booking->status !== 'cancelled')

{{ trans('site.bookings.files_hint') }}

@if ($booking->attachments->isNotEmpty()) @endif
@csrf
@endif @if ($canCancel) @endif @if ($canReview) @endif @endsection @section('js') @if ($canReview && ($errors->has('doctor_rating') || $errors->has('clinic_rating'))) @endif @endsection