2018-03-12 07:00:42 +08:00
|
|
|
@extends('app')
|
2018-05-19 03:18:12 +08:00
|
|
|
@section('title', trans_choice('common.pirep', 1).' '.$pirep->ident)
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
@section('content')
|
|
|
|
<div class="row">
|
2018-04-05 06:42:43 +08:00
|
|
|
<div class="col-8">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2018-05-30 00:04:28 +08:00
|
|
|
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
|
2018-04-05 06:42:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
{{--
|
|
|
|
DEPARTURE INFO
|
|
|
|
--}}
|
|
|
|
<div class="col-6 text-left">
|
|
|
|
<h4>
|
|
|
|
{{$pirep->dpt_airport->location}}
|
|
|
|
</h4>
|
|
|
|
<p>
|
|
|
|
<a href="{{route('frontend.airports.show', ['id' => $pirep->dpt_airport_id])}}">
|
|
|
|
{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})</a>
|
|
|
|
<br/>
|
2018-04-07 06:25:57 +08:00
|
|
|
@if($pirep->block_off_time)
|
2018-04-05 06:42:43 +08:00
|
|
|
{{ $pirep->block_off_time->toDayDateTimeString() }}
|
|
|
|
@endif
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{--
|
|
|
|
ARRIVAL INFO
|
|
|
|
--}}
|
|
|
|
<div class="col-6 text-right">
|
|
|
|
<h4>
|
|
|
|
{{$pirep->arr_airport->location}}
|
|
|
|
</h4>
|
|
|
|
<p>
|
|
|
|
<a href="{{route('frontend.airports.show', ['id' => $pirep->arr_airport_id])}}">
|
|
|
|
{{ $pirep->arr_airport->full_name }} ({{ $pirep->arr_airport_id }})</a>
|
|
|
|
<br/>
|
|
|
|
@if($pirep->block_on_time)
|
|
|
|
{{ $pirep->block_on_time->toDayDateTimeString() }}
|
|
|
|
@endif
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-04 11:45:45 +08:00
|
|
|
|
2018-04-05 06:42:43 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="progress" style="margin: 20px 0;">
|
|
|
|
<div class="progress-bar progress-bar-success" role="progressbar"
|
|
|
|
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
|
2018-05-02 09:58:05 +08:00
|
|
|
style="width: {{$pirep->progress_percent}}%;">
|
2018-04-05 06:42:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
@include('pireps.map')
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-20 05:19:06 +08:00
|
|
|
</div>
|
|
|
|
|
2018-04-05 06:42:43 +08:00
|
|
|
{{--
|
|
|
|
|
2018-04-07 06:10:45 +08:00
|
|
|
RIGHT SIDEBAR
|
2018-04-05 06:42:43 +08:00
|
|
|
|
|
|
|
--}}
|
|
|
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
2018-04-07 06:10:45 +08:00
|
|
|
<h2> </h2>
|
2018-05-02 09:58:05 +08:00
|
|
|
|
2018-05-10 23:35:10 +08:00
|
|
|
{{-- Show the link to edit if it can be edited --}}
|
|
|
|
@if(!$pirep->read_only)
|
|
|
|
<div class="float-right" style="margin-bottom: 10px;">
|
|
|
|
<form method="get"
|
|
|
|
action="{{ route('frontend.pireps.edit', ['id' => $pirep->id]) }}"
|
|
|
|
style="display: inline">
|
|
|
|
@csrf
|
2018-05-19 03:18:12 +08:00
|
|
|
<button class="btn btn-info">@lang('common.edit')</button>
|
2018-05-10 23:35:10 +08:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<form method="post"
|
|
|
|
action="{{ route('frontend.pireps.submit', ['id' => $pirep->id]) }}"
|
|
|
|
style="display: inline">
|
|
|
|
@csrf
|
2018-05-19 03:18:12 +08:00
|
|
|
<button class="btn btn-success">@lang('common.submit')</button>
|
2018-05-10 23:35:10 +08:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
<table class="table table-striped">
|
2018-05-30 00:04:28 +08:00
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td width="30%">@lang('common.state')</td>
|
|
|
|
<td>
|
|
|
|
<div class="badge badge-info">
|
|
|
|
{{ PirepState::label($pirep->state) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2018-05-02 09:58:05 +08:00
|
|
|
<tr>
|
2018-05-19 03:18:12 +08:00
|
|
|
<td width="30%">@lang('common.status')</td>
|
2018-05-02 09:58:05 +08:00
|
|
|
<td>
|
|
|
|
<div class="badge badge-info">
|
|
|
|
{{ PirepStatus::label($pirep->status) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
2017-12-20 07:30:30 +08:00
|
|
|
</tr>
|
2018-04-05 06:42:43 +08:00
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
<tr>
|
2018-05-19 03:45:52 +08:00
|
|
|
<td>@lang('pireps.source')</td>
|
2018-04-05 06:42:43 +08:00
|
|
|
<td>{{ PirepSource::label($pirep->source) }}</td>
|
2017-12-20 05:19:06 +08:00
|
|
|
</tr>
|
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
<tr>
|
2018-05-22 00:55:40 +08:00
|
|
|
<td>@lang('flights.flighttype')</td>
|
2018-03-30 03:10:49 +08:00
|
|
|
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
|
|
|
|
</tr>
|
|
|
|
|
2017-12-20 05:19:06 +08:00
|
|
|
<tr>
|
2018-05-19 03:45:52 +08:00
|
|
|
<td>@lang('pireps.filedroute')</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>
|
2018-05-19 03:18:12 +08:00
|
|
|
<td>{{ trans_choice('common.note', 2) }}</td>
|
2017-12-20 05:19:06 +08:00
|
|
|
<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>
|
2018-05-19 03:45:52 +08:00
|
|
|
<td>@lang('pireps.filedon')</td>
|
2017-12-24 01:58:17 +08:00
|
|
|
<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>
|
|
|
|
|
2018-04-05 06:42:43 +08:00
|
|
|
@if(count($pirep->fields) > 0 || count($pirep->fares) > 0)
|
|
|
|
<div class="separator"></div>
|
|
|
|
@endif
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2018-03-30 03:10:49 +08:00
|
|
|
@if(count($pirep->fields) > 0)
|
2018-05-19 03:18:12 +08:00
|
|
|
<h5>{{ trans_choice('common.field', 2) }}</h5>
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-hover table-condensed">
|
2018-02-04 08:18:09 +08:00
|
|
|
<thead>
|
2018-05-19 03:18:12 +08:00
|
|
|
<th>@lang('common.name')</th>
|
|
|
|
<th>@lang('common.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-05 06:42:43 +08:00
|
|
|
@if(count($pirep->fares) > 0)
|
|
|
|
<div class="separator"></div>
|
|
|
|
@endif
|
|
|
|
|
2018-04-04 08:21:42 +08:00
|
|
|
{{--
|
|
|
|
Show the fares that have been entered
|
|
|
|
--}}
|
|
|
|
@if(count($pirep->fares) > 0)
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2018-05-19 03:59:34 +08:00
|
|
|
<h5>{{ trans_choice('pireps.fare', 2) }}</h5>
|
2018-04-04 08:21:42 +08:00
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
<thead>
|
2018-05-19 03:45:52 +08:00
|
|
|
<th>@lang('pireps.class')</th>
|
|
|
|
<th>@lang('pireps.count')</th>
|
2018-04-04 08:21:42 +08:00
|
|
|
</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-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-05-19 03:45:52 +08:00
|
|
|
<h5>@lang('pireps.flightlog')</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
|
|
|
|