@extends("layouts.admin.app") @section("page-title") {{__("Dashboard")}} @endSection @section("page-nav-title")

{{__("Appointment Details")}}

@endsection @section("content") @include("includes.dialog")
@if($users_booking) @if($users_booking->is_cancelled == 1) @php $cancelled = \App\Models\CancelledBooking::where('booking_id',$users_booking->reservation_record_id)->first(); if($cancelled){ $userCancelled = \App\Models\User::where('id',$cancelled->cancelled_by)->first(); } @endphp @if($cancelled)

{{__('Cancelled')}}

{{__('Cancellation Reason')}}

{{$cancelled->cancellation_reason}}


{{__('Cancellation Date')}}

{{$cancelled->cancellation_date}}


{{__('Cancellation Time')}}

{{date('h:i',strtotime($cancelled->cancellation_time))}}


{{__('Cancelled By')}}

{{auth()->user()->full_name}}


@endif @endif @php $slot_time = App\Models\TimeSlot::where('id',$users_booking->slot_id)->first(); $object=App\Models\ObjectBooking::where('reservation_record_id',$users_booking->reservation_record_id)->first(); $url = App\Models\OnlineBooking::where('booking_id',$object->id)->first(); // var_dump($url); // die; @endphp

{{__('Details')}}

{{__('Time From')}}

{{date('h:i',strtotime($slot_time->time_from))}}


{{__('Time To')}}

{{date('h:i',strtotime($slot_time->time_to))}}


@php $mytime = \Carbon\Carbon::now(); $currentDate = $mytime->toDateString(); @endphp

{{__('Status')}}

{{\Illuminate\Support\Facades\App::getLocale() == 'en' ? ($currentDate <= $users_booking->date? "Coming" : "Expired") : ($currentDate <= $users_booking->date? "قادم" : "منتهي")}}


{{__('Booking Date')}}

{{$users_booking->date}}


{{__('Reservation Record Id')}}

{{$users_booking->reservation_record_id}}


{{__('Type')}}

{{$users_booking->is_online == 1 ? 'Online' : 'Direct'}}


@if($users_booking->is_online === 1 && $users_booking->is_cancelled == 0)

{{__('Zoom Url')}}

{{$url->zoom_url ?? null}}


@endif

{{__('Consultant')}}

@if($consultant) avatar @endif
{{$users_booking->full_name}}

{{$users_booking->email}}

{{__('Phone')}}

{{$users_booking->phone_number}}


@php // $slot_time = App\Models\ObjectDetails::where('id',$users_booking->object_id)->first(); @endphp {{-- @if($slot_time)--}} {{--
--}} {{--
--}} {{--

{{__('Consultant Time Slot')}}

--}} {{--
--}} {{--
--}} {{--

{{$slot_time->time_slot_types->description ? $slot_time->time_slot_types->description : "No Data"}}

--}} {{--
--}} {{--
--}} {{-- @endif--}}
@php if ($consultant){ $Specializations = \App\Models\Specialization::where('id',$consultant->specialization_id)->first(); } @endphp

{{__('Specializations')}}

{{ $Specializations ? ($Specializations->name_.\Illuminate\Support\Facades\App::getLocale() == 'en' ? $Specializations->name_en : $Specializations->name_ar ) : "The Doctor has no specialization"}}


{{__('Has Zoom')}}

{{\Illuminate\Support\Facades\App::getLocale() == 'en' ? ($consultant->has_zoom == 1 ? "The doctor has a zoom" : "The Doctor has no Zoom") : ($consultant->has_zoom == 1 ? "الطبيب لديه زوم" : "الطبيب ليس لديه زوم")}}

{{__('User')}}

@if(!$user) avatar
{{$user_data ? $user_data->full_name: "No Data" }}

{{$user_data ? $user_data->email : "No Data" }}

@else avatar
{{$user ? ($user->full_name ? $user->full_name : "No Data") : "No Data" }}
@endif

{{__('Phone')}}

{{$user ? ($user->phone_number ? $user->phone_number : "No Data") : "No Data"}}


{{__('Country')}}

{{$user ? ($user->country ? $user->country : "No Data"):"No Data"}}


{{__('Country Code')}}

{{$user ? ($user->country_code ? $user->country_code : "No Data") : "No Data"}}

@endif
@endsection @section("scripts") @endsection