@extends('layouts.frontend') @section('content')
@include('frontend.user.include.sidebar')

{{ __('messages.my_booking') }}

@if(count($recentBookings) > 0)
{{ __('messages.recent_bookings') }}
@foreach($recentBookings as $booking) @foreach($booking->items as $item) @if(!$item->related_item)
@if($booking->status == 'cancelled') Cancelled @endif
@if($item->product && $item->product->homePhoto) {{ $item->product_name }} @else Default Image @endif

THULE {{ $item->product_name }} | {{ $item->size }}

{{ __('messages.booking_id') }}: {{ $booking->id }}

{{$item->vendor_address}}

{{ __('messages.renting_details') }}:

@php $dropoffDate = $item->new_dropoff_date ?? $item->dropoff_date; $dropoffTime = $item->new_dropoff_time ?? $item->dropoff_time; @endphp
{{ __('messages.from') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }}
{{ __('messages.to') }}:
{{ \Carbon\Carbon::parse($dropoffDate)->format('d.m.Y') }}
{{ __('messages.pickup_datetime') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }} | {{ \Carbon\Carbon::parse($item->pickup_time)->format('H:i') }}
{{ __('messages.dropoff_datetime') }}:
{{ \Carbon\Carbon::parse($dropoffDate)->format('d.m.Y') }} | {{ \Carbon\Carbon::parse($dropoffTime)->format('H:i') }}
@endif @endforeach @endforeach
@endif @if(count($pastBookings) > 0)
{{ __('messages.past_bookings') }}
@foreach($pastBookings as $booking) @foreach($booking->items as $item) @if(!$item->related_item)
@if($booking->status == 'cancelled') Cancelled @endif
@if($item->product && $item->product->homePhoto) {{ $item->product_name }} @else Default Image @endif

{{ $item->product_name }} | {{ $item->size }}

{{ __('messages.booking_id') }}: {{ $booking->id }}

{{$item->vendor_address}}

{{ __('messages.renting_details') }}:

@php $dropoffDate = $item->new_dropoff_date ?? $item->dropoff_date; $dropoffTime = $item->new_dropoff_time ?? $item->dropoff_time; @endphp
{{ __('messages.from') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }}
{{ __('messages.to') }}:
{{ \Carbon\Carbon::parse($dropoffDate)->format('d.m.Y') }}
{{ __('messages.pickup_datetime') }}:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }} | {{ \Carbon\Carbon::parse($item->pickup_time)->format('H:i') }}
{{ __('messages.dropoff_datetime') }}:
{{ \Carbon\Carbon::parse($dropoffDate)->format('d.m.Y') }} | {{ \Carbon\Carbon::parse($dropoffTime)->format('H:i') }}
@endif @endforeach @endforeach
@endif
@endsection