@extends('backend.layouts.admin') @section('main-content') @php // Step 1 complete = has both pickup and dropoff $step1_complete = $quote->pick_up && $quote->drop_off; // Step 2 complete = all truck/floor/lift data filled $step2_complete = $step1_complete && $quote->service && $quote->pickup_floor && $quote->drop_off_floor && isset($quote->is_lift_available); // Step 3 complete = items json col has data $items = is_array($quote->items) ? $quote->items : json_decode($quote->items, true); $step3_complete = $step2_complete && !empty($items); // Determine redirect step if ($step3_complete) { $redirect_to_step = 4; // price page } elseif ($step2_complete) { $redirect_to_step = 3; // items page } elseif ($step1_complete) { $redirect_to_step = 2; // truck/floors page } else { $redirect_to_step = 1; // start } // Build URL $url = match($redirect_to_step) { 2 => route('booking.step2') . '?type=' . $quote->service . '&ref_number=' . $quote->ref_number, 3 => route('booking.step3') . '?ref_number=' . $quote->ref_number, 4 => route('booking.price') . '?ref_number=' . $quote->ref_number, default => route('index'), }; @endphp

{{ $title ?? 'Booking' }}

Quote: {{$quote->ref_number}}
@if(!$quote->booking_id) @endif

Name
{{$quote->customer_name??'N/A'}}
Phone
{{$quote->customer_phone??'N/A'}}
Email
{{$quote->customer_email??'N/A'}}
Amount
{{$quote->price+$quote->selected_time_price??'N/A'}}
Date
{{$quote->selected_date??'N/A'}}
Time
{{$quote->selected_time??'N/A'}}
Pick Up
{{$quote->pick_up??'N/A'}}
Drop Off
{{$quote->drop_off??'N/A'}}
Truck Type
{{$quote->getTruckType->name??'N/A'}}
Is Lit Available
{{$quote->is_lift_available == 1 ? 'Yes' : 'No'}}
Pick up Floor
{{$quote->pickup_floor??'N/A'}}
Drop off Floor
{{$quote->drop_off_floor??'N/A'}}
Special Instruction
{{$quote->special_instruction??'N/A'}}
Payment Method
{{$quote->payment_method??'N/A'}}
Quote Date
{{$quote->created_at->format('d/m/Y h:i a')??'N/A'}}
Last Update
{{$quote->updated_at->format('d/m/Y h:i a')}}

Items

@forelse($quote->items ?? [] as $index => $item) @empty @endforelse
Sr. No. Item Quantity
{{ $index + 1 }} {{ $item['name'] ?? '-' }} {{ $item['qty'] ?? 0 }}
No items found
@endsection @push('scripts') @endpush