@php if (!function_exists('air_get_date')) { function air_get_date($d) { $da = explode('-', substr($d, 0, 10)); return $da[2] . '-' . $da[1] . '-' . $da[0]; } } if (!function_exists('air_get_time')) { function air_get_time($d) { preg_match('/T(.*):/', $d, $t); return $t[1]; } } if (!function_exists('air_date')) { function air_date($d) { $da = explode('-', substr($d, 0, 10)); preg_match('/T(.*):/', $d, $t); return '

' . $t[1] . '' . $da[2] . '-' . $da[1] . '-' . $da[0] . '

'; } } @endphp @extends('user.components.layout') @push('css') @endpush @section('main')
{{-- @php dd($flightBookings['ticket']['FlightItinerary']['Segments'] ); @endphp --}} @foreach ($flightBookings['ticket']['FlightItinerary']['Segments'] as $i => $segment) @php $airline = $segment['Airline']; $origin = $segment['Origin']; $destination = $segment['Destination']; @endphp @if ($i > 0)
{{ floor(($segment['GroundTime'] ?? 0) / 60) }} Hours {{ ($segment['GroundTime'] ?? 0) % 60 }} Minutes
@endif
{{ $airline['AirlineName'] }} {{ $airline['AirlineCode'] }}-{{ $airline['FlightNumber'] }}

{{ $origin['Airport']['AirportCode'] }} {{ $origin['Airport']['CityName'] }}

@if ($origin['Airport']['Terminal'] != '') T-{{ $origin['Airport']['Terminal'] }} @endif {{ $origin['Airport']['AirportName'] }}

{!! air_date($origin['DepTime']) !!}

{{ $destination['Airport']['CityName'] }} {{ $destination['Airport']['AirportCode'] }}

@if ($destination['Airport']['Terminal'] != '') T-{{ $destination['Airport']['Terminal'] }} @endif {{ $destination['Airport']['AirportName'] }}

{!! air_date($destination['ArrTime']) !!}

{{ floor($segment['Duration'] / 60) }} Hours {{ $segment['Duration'] % 60 }} Minutes

{{ $segment['CabinBaggage'] }} Cabin

{{ $segment['Baggage'] }}

@endforeach
@foreach ($flightBookings['ticket']['FlightItinerary']['Passenger'] as $pax) @endforeach
Type PaxId Name Ticket Add on
@if ($pax['PaxType'] == 1) @elseif($pax['PaxType'] == 2) @else @endif {{ $pax['PaxId'] }} {{ $pax['Title'] }} {{ $pax['FirstName'] }} {{ $pax['LastName'] }} {{ $pax['Ticket']['TicketId'] }} @if ($pax['Fare']['TotalBaggageCharges'] > 0 && ($iii = 1)) @endif @if ($pax['Fare']['TotalMealCharges'] > 0 && ($iii = 1)) @endif @if ($pax['Fare']['TotalSeatCharges'] > 0 && ($iii = 1)) @endif @isset($iii) @else --- --- @endisset
@if (isset($flightBookings['ticket']['FlightItinerary']['MiniFareRules']))
Cancellation & Re-Issue {{ $flightBookings['ticket']['FlightItinerary']['MiniFareRules'][0]['JourneyPoints'] }}
@foreach ($flightBookings['ticket']['FlightItinerary']['MiniFareRules'] as $rule) @if ($rule['Type'] == 'Reissue') @endif @endforeach
If Rescheduled Charges
{{ ($rule['From'] ?? 0) + 2 }}-{{ $rule['To'] ? $rule['To'] + 2 : 'More' }} {{ $rule['Unit'] }} {{ $rule['Details'] }}
@foreach ($flightBookings['ticket']['FlightItinerary']['MiniFareRules'] as $rule) @if ($rule['Type'] == 'Cancellation') @endif @endforeach
If Cancelled Charges
{{ ($rule['From'] ?? 0) + 2 }}-{{ $rule['To'] ? $rule['To'] + 2 : 'More' }} {{ $rule['Unit'] }} {{ $rule['Details'] }}
@endif
@if (!$flightBookings['is_cancelled']) @else Booking Has been cancelled @endif
@endsection @push('popup')
@csrf @foreach ($flightBookings['ticket']['FlightItinerary']['Passenger'] as $i => $pax) @endforeach
Booking Has been cancelled

Some Error Occurred !!!
@endpush @push('js') @endpush