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

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

{{-- 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
@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 }}
@lang('pireps.filedon') {{ show_datetime($pirep->created_at) }}
@if(count($pirep->fields) > 0 || count($pirep->fares) > 0)
@endif @if(count($pirep->fields) > 0)
{{ trans_choice('common.field', 2) }}
@foreach($pirep->fields as $field) @endforeach
@lang('common.name') @lang('common.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('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 as $log) @endforeach
{{ show_datetime($log->created_at) }} {{ $log->log }}
@endif @endsection