@extends('app') @section('title', 'PIREP '.$pirep->ident) @section('content')

{{$pirep->airline->code}}{{ $pirep->ident }}

Arrived {{$pirep->created_at->diffForHumans()}}

{{-- DEPARTURE INFO --}}

{{$pirep->dpt_airport->location}}

{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})
@if($pirep->block_off_time->toDayDateTimeString()) {{ $pirep->block_off_time->toDayDateTimeString() }} @endif

{{-- ARRIVAL INFO --}}

{{$pirep->arr_airport->location}}

{{ $pirep->arr_airport->full_name }} ({{ $pirep->arr_airport_id }})
@if($pirep->block_on_time) {{ $pirep->block_on_time->toDayDateTimeString() }} @endif

{{ Utils::minutesToTimeString($pirep->flight_time) }}
@include('pireps.map')
{{-- RIGHT SIDEBAR --}}

 

{{----}} {{----}} {{----}} {{----}}
Status @php if($pirep->state === PirepState::PENDING) $badge = 'warning'; elseif ($pirep->state === PirepState::ACCEPTED) $badge = 'success'; elseif ($pirep->state === PirepState::REJECTED) $badge = 'danger'; else $badge = 'info'; @endphp
{{ PirepState::label($pirep->state) }}
Source {{ PirepSource::label($pirep->source) }}
Departure/Arrival--}} {{--{{ $pirep->dpt_airport->name }}--}} {{--({{$pirep->dpt_airport->icao}})--}} {{--to--}} {{--{{ $pirep->arr_airport->name }}--}} {{--({{$pirep->arr_airport->icao}})--}} {{--
Flight Type {{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}
Filed Route {{ $pirep->route }}
Notes {{ $pirep->notes }}
Filed On {{ show_datetime($pirep->created_at) }}
@if(count($pirep->fields) > 0 || count($pirep->fares) > 0)
@endif @if(count($pirep->fields) > 0)
fields
@foreach($pirep->fields as $field) @endforeach
Name Value
{{ $field->name }} {{ $field->value }}
@endif @if(count($pirep->fares) > 0)
@endif {{-- Show the fares that have been entered --}} @if(count($pirep->fares) > 0)
fares
@foreach($pirep->fares as $fare) @endforeach
Class Count
{{ $fare->fare->name }} ({{ $fare->fare->code }}) {{ $fare->count }}
@endif
@if(count($pirep->acars_logs) > 0)
flight log
@foreach($pirep->acars_logs as $log) @endforeach
{{ show_datetime($log->created_at) }} {{ $log->log }}
@endif @endsection