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

{{$pirep->airline->code}}{{ $pirep->ident }}
Arrived {{$pirep->created_at->diffForHumans()}}

@if(filled($pirep->dpt_airport->iata)) {{ $pirep->dpt_airport->iata }} @endif {{ $pirep->dpt_airport->location }}

{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})
{{ $pirep->created_at->toDayDateTimeString() }}

flight info
Status @if($pirep->state === PirepState::PENDING)
@elseif($pirep->state === PirepState::ACCEPTED)
@elseif($pirep->state === PirepState::REJECTED)
@else
@endif {{ 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) }}
Flight Time {{ Utils::minutesToTimeString($pirep->flight_time) }}
Filed Route {{ $pirep->route }}
Notes {{ $pirep->notes }}
Filed On {{ show_datetime($pirep->created_at) }}
{{-- Show the fields that have been entered --}} @if(count($pirep->fields) > 0)
fields
@foreach($pirep->fields as $field) @endforeach
Name Value
{{ $field->name }} {{ $field->value }}
@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
@include('pireps.map') @if(count($pirep->acars_logs) > 0)
flight log
@foreach($pirep->acars_logs as $log) @endforeach
{{ show_datetime($log->created_at) }} {{ $log->log }}
@endif @endsection