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

{{ trans('clinic.bookings.add') }}

{{ trans('clinic.common.back') }}
@csrf @if ($lead)
{{ trans('crm.convert.booking_for', ['name' => $lead->name]) }} @if ($lead->offer || $lead->interest) — {{ $lead->offer?->title ?? $lead->interest }} @endif {{ trans('crm.list.open') }}
@endif
@if ($followup) {{-- Re-examination booking: patient and the original visit are fixed by the follow-up record and shown read-only; only the new date/time is editable. store() re-derives patient/doctor/clinic/type server-side from $followup rather than trusting these hidden fields, so this is a UX guard, not the security boundary. --}}
{{ trans('clinic.followups.booking_from_banner', [ 'patient' => $followup->patient->name, 'date' => optional($followup->booking->scheduled_at)->format('Y-m-d'), ]) }}
{{ trans('clinic.followups.patient') }}
{{ $followup->patient->name }} — {{ $followup->patient->email }}
{{ trans('clinic.followups.doctor') }}
{{ $followup->doctor->name }} ({{ $followup->doctor->specialty->name }})
{{ trans('clinic.followups.clinic') }}
{{ $followup->clinicProfile->branch->name }} — {{ $followup->clinicProfile->name }}
{{ trans('clinic.followups.last_visit') }}
{{ optional($followup->booking->scheduled_at)->format('Y-m-d') }}
@else
@error('patient_id')
{{ $message }}
@enderror
@if ($branches->count() > 1)
@endif
@error('clinic_profile_id')
{{ $message }}
@enderror
@error('doctor_id')
{{ $message }}
@enderror
@php $selectedType = old('type', 'visit'); @endphp @error('type')
{{ $message }}
@enderror
@endif
@error('date')
{{ $message }}
@enderror
{{ trans('clinic.bookings.pick_doctor_clinic_date') }}
@error('time')
{{ $message }}
@enderror
@endsection @section('js') {!! JsValidator::formRequest('App\Http\Requests\Admin\Clinic\StoreAdminBookingRequest', '#AdminBookingForm') !!} @endsection