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

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

@if($pirep->state === PirepState::IN_PROGRESS) @else __('Arrived') {{$pirep->created_at->diffForHumans()}} @endif

{{-- DEPARTURE INFO --}}

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

{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})
@if($pirep->block_off_time) {{ $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

@include('pireps.map')
{{-- RIGHT SIDEBAR --}}

 

{{-- Show the link to edit if it can be edited --}} @if(!$pirep->read_only)
@csrf
 
@csrf
@endif
{{ __('Status') }}
{{ PirepStatus::label($pirep->status) }}
{{ __('Source') }} {{ PirepSource::label($pirep->source) }}
{{ __('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)
{{ __trans_choice('Field', 2) }}
@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)
{{ __trans_choice('Fare', 2) }}
@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