@extends('layouts.app') @extends('layouts.navbar') @section('content')
{{--
@if (Auth::user()->dp!=NULL) Display Picture @else Display Picture @endif
--}}

{{ Auth::user()->name }}

@if(Auth::user()->user_type==1) @if(Auth::user()->online_status==1) {{ __('Online') }} @else {{ __('Offline') }} @endif @endif
@if(Auth::user()->user_type==1 && Auth::user()->vehicle_no=="")
@endif
{{--

{{ __('Last Updated : ') }}
{{ __('Latitude : ') }}
{{ __('Longitude : ') }}

{{ __("Pending Booking") }}

@forelse ($pending as $booking)
{{ __('Actions') }}
@if (Auth::user()->user_type==0) {{ __('Call') }} {{ __('WhatsApp') }} @if ($booking->order_status_id<2) {{ __('Cancel') }} @endif @endif @if (Auth::user()->user_type==1) @if ($booking->booking_type_id!=1) @if ($booking->order_status_id==1) @elseif($booking->order_status_id==2) @else {{ __('N/A') }} @endif @else @if ($booking->order_status_id==1) @elseif($booking->order_status_id==2) @elseif($booking->order_status_id==5) @elseif($booking->order_status_id==6) @else {{ __('N/A') }} @endif @endif @endif
{{ __('Status : ') }} {{ $booking->orderStatus->name }}
@if (Auth::user()->user_type==0) @if ($booking->driver->dp!=NULL) Driver Photo @endif
{{ __('Driver Name : ') }} @if ($booking->driver_id!=NULL && $booking->driver()->exists()) {{ $booking->driver->name }} @else {{ __("N/A") }} @endif
{{ __('Vehicle No : ') }} @if ($booking->driver_id!=NULL && $booking->driver()->exists()) {{ $booking->driver->vehicle_no }} @else {{ __("N/A") }} @endif
@if ($booking->order_status_id>=2)
{{ __('OTP : ') }} {{ $booking->otp }}
@endif @else
{{ __('Customer Name : ') }} {{ $booking->user->name }}
{{ __('Call') }} @endif
{{ __('From : ') }} {{ $booking->from }}
{{ __('To : ') }} {{ $booking->to }}
{{ __('Distance : ') }} {{ round($booking->distance,1) }}{{ __('km') }}
{{ __('Estimated Time : ') }} {{ $booking->estimated_time }}{{ __('mins') }}
{{ __('Fare : ') }} {{ __("Rs.") }}{{ round($booking->total_fare,0) }}
{{ __('Coupon Amt : ') }} @if ($booking->coupon_id!=NULL) @if ($booking->coupon->type==1) {{ __("Rs.") }}{{ ($booking->coupon_id!=NULL) ? round($booking->coupon->amount,0) : 0 }} @elseif ($booking->coupon->type==2) {{ __("Rs.") }}{{ ($booking->coupon_id!=NULL) ? round($booking->total_fare-$booking->fare,0) : 0 }} @endif @else {{ __("Rs.") }}{{ ($booking->coupon_id!=NULL) ? round($booking->coupon->amount,0) : 0 }} @endif
{{ __('Estimated Fare : ') }} {{ __("Rs.") }}{{ round($booking->fare,0) }}
@empty
{{ __('No Booking Available!') }}
@endforelse {{ $pending->withQueryString()->render('pagination::bootstrap-5') }}
--}} {{--
--}} {{--

{{ __("Booking History") }}

@if(Auth::user()->user_type==0) @else @endif @forelse ($orderHistory as $order) @if(Auth::user()->user_type==0) @else @endif @empty @endforelse
{{ __('Date') }} {{ __('Booking Type') }} {{ __('Status') }}{{ __('Driver Name') }}{{ __('Customer Name') }}{{ __('Distance') }} {{ __('Fare') }} {{ __('Coupon Amt.') }} {{ __('Paid') }}
{{ \Carbon\Carbon::parse($order->order_date)->toFormattedDateString() }} {{ $order->bookingType->name }} {{ $order->orderStatus->name }} @if ($order->driver_id!=NULL && $order->driver()->exists()) {{ $order->driver->name }} @else {{ __("N/A") }} @endif {{ $order->user->name }} {{ round($order->distance,1) }}{{ __('km') }} {{ __("Rs. ") }}{{ round($order->total_fare,0) }} @if ($order->coupon_id!=NULL) @if ($order->coupon->type==1) {{ __("Rs.") }}{{ ($order->coupon_id!=NULL) ? round($order->coupon->amount,0) : 0 }} @elseif ($order->coupon->type==2) {{ __("Rs.") }}{{ ($order->coupon_id!=NULL) ? round($order->final_fare-$order->total_fare,0) : 0 }} @endif @else {{ __("Rs.") }}{{ ($order->coupon_id!=NULL) ? round($order->coupon->amount,0) : 0 }} @endif {{ __("Rs. ") }}{{ round($order->final_fare,0) }}
{{ __('History Unavailable!') }}
{{ $orderHistory->withQueryString()->render('pagination::bootstrap-5') }}
--}}
@endsection @extends('layouts.footer')