@php use App\Models\TimeSlot;use App\Models\UserBookings; @endphp @php use Carbon\Carbon; @endphp @php use Illuminate\Support\Facades\App; @endphp @php use App\Models\Doctor; @endphp @extends("layouts.admin.app") @section("page-title") {{__("Dashboard")}} @endSection @section("page-nav-title")

{{__("All Appointments")}}

@endsection @section("content") @include("includes.dialog") @if(Session::has('collision')) @endif @if(Session::has('success')) @endif @if(Session::has('edit_success')) @endif @if (Doctor::where('admin_id', auth()->user()->id)->first() === null)
@endif
@if($users_booking) @foreach($users_booking as $index => $users) @php $userName = UserBookings::where('reservation_record_id',$users->reservation_record_id)->first() @endphp @php $slot_time = TimeSlot::where('id',$users->slot_id)->first(); $mytime = Carbon::now(); $currentDate = $mytime->toDateString(); @endphp @if($slot_time) @endif @endforeach @endif
{{__("#ID")}} {{__("Booking Date")}} {{__("User Name")}} {{__("Doctor Name")}} {{__("Time From")}} {{__("Time To")}} {{__("Status")}} {{__("Online/Direct")}} {{__("Cancellation")}} {{__("Details")}} {{__("Change Booking Time Slot")}}
{{$users->reservation_record_id}} {{$users->date}}{{$users->user ? ($users->user->name ? $users->user->name : $userName->name) : $userName->name }} {{$users->name ? $users->name : "No Doctor Name" }}{{$slot_time->time_from? date('h:i',strtotime($slot_time->time_from)) : "No Data"}} {{$slot_time->time_to ? date('h:i',strtotime($slot_time->time_to)) : "No Data"}} {{App::getLocale() == 'en' ? ($currentDate <= $users->date? "Coming" : "Expired") : ($currentDate <= $users->date? "قادم" : "منتهي")}} {{App::getLocale() == 'en' ? ($users->is_online == 1 ? 'Online' : 'Direct') : ($users->is_online == 1 ? 'عبر الانترنت' : 'مباشر')}} {{__("Details")}}
@endsection @section("scripts") @endsection