@extends('dashboard.admin.layouts.master') @section('content')

{{ trans('clinic.bookings.title') }} #{{ $booking->id }}

{{ trans('clinic.common.back') }}
@if(session('success'))
{{ session('success') }}
@endif

{{ trans('clinic.doctors.title') }}: {{ $booking->doctor->name }} ({{ $booking->doctor->specialty->name }})

{{ trans('clinic.clinics.title') }}: {{ $booking->branch->name }}

Patient: {{ $booking->patient->name }} — {{ $booking->patient->email }}

{{ trans('clinic.bookings.type') }}: {{ trans('clinic.bookings.'.$booking->type) }}

{{ trans('clinic.bookings.date') }}: {{ $booking->scheduled_at->format('Y-m-d H:i') }}

{{ trans('clinic.bookings.status') }}: {{ trans('clinic.bookings.statuses.'.$booking->status) }}

{{ trans('clinic.bookings.total_due') }}: {{ number_format((float) $booking->price, 2) }}

@if ($booking->payment)

{{ trans('clinic.bookings.pay_title') }}: {{ trans('clinic.bookings.statuses.'.($booking->payment->status === 'paid' ? 'confirmed' : $booking->payment->status)) }}

@endif
@can('clinic.bookings.confirm') @if ($booking->status === 'pending')
@csrf
@endif @endcan @can('clinic.bookings.cancel') @if (in_array($booking->status, ['pending', 'confirmed']))
@csrf
@endif @endcan
@if ($booking->status === 'completed') @php $followup = $booking->followup; @endphp @php $doctorFlagged = $followup && ($followup->created_by === null || $followup->doctor_note !== null); @endphp

{{ trans('clinic.followups.title') }}

{{ trans('clinic.followups.doctor_flag_title') }}

@if ($doctorFlagged)

{{ trans('clinic.followups.doctor_says_required') }}

@if ($followup->doctor_note)

{{ trans('clinic.followups.doctor_note') }}: {{ $followup->doctor_note }}

@endif @else

{{ trans('clinic.followups.doctor_says_not_required') }}

@endif
@if ($followup && $followup->status === 'scheduled')
{{ trans('clinic.followups.already_scheduled') }}
@else @can('clinic.followups.manage')
@csrf

{{ trans('clinic.followups.admin_decision_title') }}

@error('is_required')
{{ $message }}
@enderror
@error('due_date')
{{ $message }}
@enderror
@error('admin_note')
{{ $message }}
@enderror
@endcan @can('clinic.bookings.create') @if ($followup && $followup->is_required && $followup->due_date) {{ trans('clinic.followups.book_followup') }} @endif @endcan @endif
@endif
@endsection @section('js') @endsection