2018-03-12 07:00:42 +08:00
|
|
|
@extends('app')
|
2017-12-20 10:19:36 +08:00
|
|
|
@section('title', 'PIREP '.$pirep->ident)
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
@section('content')
|
|
|
|
<div class="row">
|
2018-03-30 03:10:49 +08:00
|
|
|
<div class="col-12">
|
2018-04-04 08:21:42 +08:00
|
|
|
<h2>{{ $pirep->ident }}</h2>
|
2017-12-20 05:19:06 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2018-03-30 03:10:49 +08:00
|
|
|
<div class="col-8">
|
2018-04-04 08:21:42 +08:00
|
|
|
<h5>flight info</h5>
|
|
|
|
<table class="table table-hover table-condensed">
|
2017-12-20 07:30:30 +08:00
|
|
|
<tr>
|
|
|
|
<td>Status</td>
|
|
|
|
<td>
|
2017-12-21 03:27:57 +08:00
|
|
|
@if($pirep->state === PirepState::PENDING)
|
2018-01-02 00:49:26 +08:00
|
|
|
<div class="badge badge-warning">
|
2017-12-20 10:19:36 +08:00
|
|
|
@elseif($pirep->state === PirepState::ACCEPTED)
|
2018-01-02 00:49:26 +08:00
|
|
|
<div class="badge badge-success">
|
|
|
|
@elseif($pirep->state === PirepState::REJECTED)
|
|
|
|
<div class="badge badge-danger">
|
2017-12-20 07:30:30 +08:00
|
|
|
@else
|
2018-01-02 00:49:26 +08:00
|
|
|
<div class="badge badge-info">
|
2017-12-20 07:30:30 +08:00
|
|
|
@endif
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ PirepState::label($pirep->state) }}</div>
|
2017-12-21 03:27:57 +08:00
|
|
|
|
|
|
|
<span class="description" style="padding-left: 20px;">
|
2018-03-13 06:58:12 +08:00
|
|
|
source: {{ PirepSource::label($pirep->source) }}
|
2017-12-21 03:27:57 +08:00
|
|
|
</span>
|
2017-12-20 07:30:30 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2017-12-20 05:19:06 +08:00
|
|
|
<tr>
|
|
|
|
<td>Departure/Arrival</td>
|
|
|
|
<td>
|
2018-04-04 08:21:42 +08:00
|
|
|
{{ $pirep->dpt_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $pirep->dpt_airport->icao
|
|
|
|
])}}">{{$pirep->dpt_airport->icao}}</a>)
|
2017-12-20 05:19:06 +08:00
|
|
|
<span class="description">to</span>
|
2018-04-04 08:21:42 +08:00
|
|
|
{{ $pirep->arr_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $pirep->arr_airport->icao
|
|
|
|
])}}">{{$pirep->arr_airport->icao}}</a>)
|
2017-12-20 05:19:06 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>Flight Type</td>
|
|
|
|
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
|
|
|
|
</tr>
|
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
<tr>
|
|
|
|
<td>Flight Time</td>
|
|
|
|
<td>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Utils::minutesToTimeString($pirep->flight_time) }}
|
2017-12-20 05:19:06 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
2017-12-24 01:58:17 +08:00
|
|
|
<td>Filed Route</td>
|
2017-12-20 05:19:06 +08:00
|
|
|
<td>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $pirep->route }}
|
2017-12-20 05:19:06 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Notes</td>
|
|
|
|
<td>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $pirep->notes }}
|
2017-12-20 05:19:06 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2017-12-24 01:58:17 +08:00
|
|
|
<tr>
|
|
|
|
<td>Filed On</td>
|
|
|
|
<td>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ show_datetime($pirep->created_at) }}
|
2017-12-24 01:58:17 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
<div class="col-4">
|
|
|
|
{{--
|
|
|
|
Show the fields that have been entered
|
|
|
|
--}}
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
@if(count($pirep->fields) > 0)
|
2018-04-04 08:21:42 +08:00
|
|
|
<h5>fields</h5>
|
|
|
|
<table class="table table-hover table-condensed">
|
2018-02-04 08:18:09 +08:00
|
|
|
<thead>
|
2018-03-30 03:10:49 +08:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Value</th>
|
2018-02-04 08:18:09 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($pirep->fields as $field)
|
|
|
|
<tr>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $field->name }}</td>
|
|
|
|
<td>{{ $field->value }}</td>
|
2018-02-04 08:18:09 +08:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-03-30 03:10:49 +08:00
|
|
|
@endif
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2018-04-04 08:21:42 +08:00
|
|
|
{{--
|
|
|
|
Show the fares that have been entered
|
|
|
|
--}}
|
|
|
|
@if(count($pirep->fares) > 0)
|
|
|
|
<div class="separator"></div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h5>fares</h5>
|
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
<thead>
|
|
|
|
<th>Class</th>
|
|
|
|
<th>Count</th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($pirep->fares as $fare)
|
|
|
|
<tr>
|
|
|
|
<td>{{ $fare->fare->name }} ({{ $fare->fare->code }})</td>
|
|
|
|
<td>{{ $fare->count }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2018-02-25 05:38:25 +08:00
|
|
|
</div>
|
2018-04-04 08:21:42 +08:00
|
|
|
</div>
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
@include('pireps.map')
|
2018-02-22 05:24:46 +08:00
|
|
|
|
|
|
|
@if(count($pirep->acars_logs) > 0)
|
2018-04-04 08:21:42 +08:00
|
|
|
<div class="separator"></div>
|
|
|
|
<div class="row">
|
2018-02-22 05:24:46 +08:00
|
|
|
<div class="col-12">
|
2018-04-04 08:21:42 +08:00
|
|
|
<h5>flight log</h5>
|
2018-02-22 05:24:46 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-hover table-condensed" id="users-table">
|
2018-02-22 05:24:46 +08:00
|
|
|
<tbody>
|
|
|
|
@foreach($pirep->acars_logs as $log)
|
|
|
|
<tr>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td nowrap="true">{{ show_datetime($log->created_at) }}</td>
|
|
|
|
<td>{{ $log->log }}</td>
|
2018-02-22 05:24:46 +08:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-12-20 05:19:06 +08:00
|
|
|
@endsection
|
2017-12-20 07:30:30 +08:00
|
|
|
|