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

{{ $pirep->airline->icao }}{{ $pirep->ident }} : {{ $pirep->dpt_airport_id }} to {{ $pirep->arr_airport_id }}

{{-- Show the link to edit if it can be edited --}} @if (!empty($pirep->simbrief)) View SimBrief @endif @if(!$pirep->read_only)
@csrf
 
@csrf
@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 --}}
@if ($pirep->state !== PirepState::DRAFT) @endif @if($pirep->score && $pirep->landing_rate) @endif
@lang('common.state')
{{ PirepState::label($pirep->state) }}
@lang('common.status')
{{ PirepStatus::label($pirep->status) }}
@lang('pireps.source') {{ PirepSource::label($pirep->source) }}
@lang('flights.flighttype') {{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}
@lang('pireps.filedroute') {{ $pirep->route }}
{{ trans_choice('common.note', 2) }} {{ $pirep->notes }}
Score {{ $pirep->score }}
Landing Rate {{ number_format($pirep->landing_rate) }}
@lang('pireps.filedon') {{ show_datetime($pirep->created_at) }}
@if(count($pirep->fields) > 0)
@endif @if(count($pirep->fields) > 0)
{{ trans_choice('common.field', 2) }}
@foreach($pirep->fields as $field) @endforeach
@lang('common.name') {{ trans_choice('common.value', 1) }}
{{ $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('pireps.fare', 2) }}
@foreach($pirep->fares as $fare) @endforeach
@lang('pireps.class') @lang('pireps.count')
{{ $fare->fare->name }} ({{ $fare->fare->code }}) {{ $fare->count }}
@endif
@if(count($pirep->acars_logs) > 0)
@lang('pireps.flightlog')
@foreach($pirep->acars_logs->sortBy('created_at') as $log) @endforeach
{{ show_datetime($log->created_at) }} {{ $log->log }}
@endif @if(!empty($pirep->simbrief))
 OFP
{!! $pirep->simbrief->xml->text->plan_html !!}
@endif @endsection