@extends('app')
@section('title', trans_choice('common.flight', 1).' '.$flight->ident)
@section('content')
<div class="row">
<div class="col-8">
<div class="col-12">
<h2>{{ $flight->ident }}</h2>
</div>
<table class="table">
<tr>
<td>@lang('common.departure')</td>
<td>
{{ optional($flight->dpt_airport)->name ?? $flight->dpt_airport_id }}
(<a href="{{route('frontend.airports.show', [
'id' => $flight->dpt_airport_id
])}}">{{$flight->dpt_airport_id}}</a>)
@ {{ $flight->dpt_time }}
</td>
</tr>
<td>@lang('common.arrival')</td>
{{ optional($flight->arr_airport)->name ?? $flight->arr_airport_id }}
'id' => $flight->arr_airport_id
])}}">{{$flight->arr_airport_id }}</a>)
@ {{ $flight->arr_time }}</td>
@if($flight->alt_airport_id)
<td>@lang('flights.alternateairport')</td>
{{ optional($flight->alt_airport)->name ?? $flight->alt_airport_id }}
'id' => $flight->alt_airport_id
])}}">{{$flight->alt_airport_id}}</a>)
@endif
@if(filled($flight->route))
<td>@lang('flights.route')</td>
<td>{{ $flight->route }}</td>
@if(filled($flight->callsign))
<td>@lang('flights.callsign')</td>
<td>{{ $flight->airline->icao }} {{ $flight->callsign }}</td>
@if(filled($flight->notes))
<td>{{ trans_choice('common.note', 2) }}</td>
<td>{{ $flight->notes }}</td>
</table>
@include('flights.map')
<div class="col-4">
<h5>{{$flight->dpt_airport_id}} @lang('common.metar')</h5>
{{ Widget::Weather([
'icao' => $flight->dpt_airport_id,
]) }}
<br/>
<h5>{{$flight->arr_airport_id}} @lang('common.metar')</h5>
'icao' => $flight->arr_airport_id,
@if ($flight->alt_airport_id)
<h5>{{$flight->alt_airport_id}} @lang('common.metar')</h5>
'icao' => $flight->alt_airport_id,
@endsection