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

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

@if($pirep->state === PirepState::IN_PROGRESS) @else @lang('frontend.pireps.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
@lang('common.status')
{{ PirepStatus::label($pirep->status) }}
@lang('frontend.pireps.source') {{ PirepSource::label($pirep->source) }}
@lang('frontend.pireps.flighttype') {{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}
@lang('frontend.pireps.filedroute') {{ $pirep->route }}
{{ trans_choice('common.note', 2) }} {{ $pirep->notes }}
@lang('frontend.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('frontend.pireps.fare', 2) }}
@foreach($pirep->fares as $fare) @endforeach
@lang('frontend.pireps.class') @lang('frontend.pireps.count')
{{ $fare->fare->name }} ({{ $fare->fare->code }}) {{ $fare->count }}
@endif
@if(count($pirep->acars_logs) > 0)
@lang('frontend.pireps.flightlog')
@foreach($pirep->acars_logs as $log) @endforeach
{{ show_datetime($log->created_at) }} {{ $log->log }}
@endif @endsection