@extends('home/layouts/master') @section('title', 'View booking') @section('style') @endsection @section('content') {{-- @dd($booking) --}}

View Booking

Order ID

{{ $booking->order_id ?? '' }}

Booking Date

{{ $booking->created_at->format('D, d M Y, h:i A') ?? '' }}

Payment Method

@if($booking->status === 'issued' || $booking->status === 'cancel') @elseif($booking->status === 'expired' || !$booking->payment_limit || now()->greaterThan($booking->payment_limit)) Expired @else Pay before () @endif

{{ strtoupper($booking->status ?? '') }}

Flights Selected

@forelse ($booking->flights as $key => $flight)

{{ $key === 0 ? 'Departure' : 'Return' }}

{{ $flight->departure_date->format('d M, Y') ?? '' }}

{{ $flight->airline ?? '' }} Logo

{{ $flight->airline ?? '' }}

{{ $flight->departure_date->format('h:i A') ?? '' }}

{{ $flight->duration ?? '' }}

{{ $flight->arrival_date->format('h:i A') ?? '' }}

{{ $flight->departure_name ?? '' }} ({{ $flight->departure_code ?? '' }}) - {{ $flight->is_connected ? 'Connecting' : 'Nonstop' }} - {{ $flight->arrival_name ?? '' }} ({{ $flight->arrival_code ?? '' }})
{{ $flight->cabin_name_with_code ?? '' }}

Total Price

{{ $flight->price_with_code ?? '' }}

@empty

No flights found.

@endforelse

Price Summary

@forelse ($booking->bookingItems as $item)
{{ $booking->airline ?? '' }} Airline - {{ $item->passenger_code }} {{ $item->total_price ?? '' }}
@empty @endforelse
Tax {{ $booking->tax_code ?? 'PKR' }} {{ number_format($booking->tax ?? 0, 2) }}
Price you pay {{ $booking->total_tax_price ?? '' }}

Travelers

@php $passengers = is_string($booking->passenger_details) ? (json_decode($booking->passenger_details, true) ?? []) : $booking->passenger_details; @endphp
@forelse ($passengers as $passenger)

{{ $passenger['title'] ?? 'MR' }}. {{ $passenger['given_name'] ?? '' }} {{ $passenger['surname'] ?? '' }}

{{ $booking->client->full_phone ?? '' }}

{{ $booking->client->email ?? '' }}

@empty

No travelers found.

@endforelse
@endsection @section('script') @if($booking->status !== 'expired' || $booking->payment_limit || now()->greaterThan($booking->payment_limit)) @endif @endsection