@extends('user.layouts.app') @section('title', 'My Bookings') @push('styles') @endpush @section('content')

My Booking Requests

Track and manage all your booking requests in one place

@if ($bookings->count() > 0)
@foreach ($bookings as $index => $booking) @endforeach
# Booking ID Route Carrier Amount Tender Status Requested Status Actions
{{ '#' . (($bookings->currentPage() - 1) * $bookings->perPage() + $index + 1) }}
{{ $booking->tender_id ?? 'TQL_' . str_pad($booking->id, 7, '0', STR_PAD_LEFT) }}
{{-- Quote: #{{ $booking->quote_id }} --}}
@if ($booking->quote && $booking->quote->pickupDetail && $booking->quote->deliveryDetail)
{{ $booking->quote->pickupDetail->city }}, {{ $booking->quote->pickupDetail->state }}
{{ Str::limit($booking->quote->pickupDetail->address_1, 25) }}
{{ $booking->quote->deliveryDetail->city }}, {{ $booking->quote->deliveryDetail->state }}
{{ Str::limit($booking->quote->deliveryDetail->address_1, 25) }}
@else @endif
@php $carrier = $booking->carrier_data @endphp
{{ $carrier['carrier'] ?? 'Unknown Carrier' }}
@if ($carrier['isPreferred'] ?? false) Preferred @endif @if ($carrier['isCarrierOfTheYear'] ?? false) COTY @endif
{{ $carrier['serviceLevelDescription'] ?? ($carrier['serviceLevel'] ?? 'Standard') }} {{ $carrier['transitDays'] ?? 'N/A' }} transit days
${{ number_format($booking->total_amount, 2) }}
{{-- @if ($booking->markup_percent > 0) + {{ $booking->markup_percent }}% fee @endif --}}
@if ($booking->tender_id) @php $tenderResponse = $booking->tender_response ?? []; $isSuccess = isset($tenderResponse['success']) && $tenderResponse['success']; @endphp
@if ($isSuccess) Tendered
{{ Str::limit($booking->tender_id, 15) }} {{ $tenderResponse['message'] ?? 'Success' }}
@else Failed
{{ $tenderResponse['error'] ?? 'Tender failed' }}
@endif
@else Not Tendered @endif
{{ $booking->created_at->format('M d, Y') }}
{{ $booking->created_at->format('h:i A') }}
{{ $booking->created_at->diffForHumans() }}
@php $statusConfig = [ 'pending' => [ 'class' => 'badge-bg-pending', 'icon' => 'clock', ], 'approved' => [ 'class' => 'badge-bg-approved', 'icon' => 'check-circle', ], 'confirmed' => [ 'class' => 'badge-bg-confirmed', 'icon' => 'check-double', ], 'rejected' => [ 'class' => 'badge-bg-rejected', 'icon' => 'times-circle', ], ]; $config = $statusConfig[$booking->status] ?? [ 'class' => 'bg-secondary', 'icon' => 'question-circle', ]; @endphp {{ ucfirst($booking->status) }}
Showing {{ ($bookings->currentPage() - 1) * $bookings->perPage() + 1 }}-{{ min($bookings->currentPage() * $bookings->perPage(), $bookings->total()) }} from {{ $bookings->total() }}
@else

No bookings yet

You haven't made any booking requests yet.
Start by creating a freight quote!.

@endif
@endsection @push('scripts') @endpush