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')
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="row">
|
2020-03-23 21:31:35 +08:00
|
|
|
<div class="col-sm-8">
|
2021-11-09 05:08:19 +08:00
|
|
|
<h2>{{ $pirep->ident }} : {{ $pirep->dpt_airport_id }} to {{ $pirep->arr_airport_id }}</h2>
|
2020-03-23 21:31:35 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-4">
|
|
|
|
{{-- Show the link to edit if it can be edited --}}
|
|
|
|
@if (!empty($pirep->simbrief))
|
|
|
|
<a href="{{ url(route('frontend.simbrief.briefing', [$pirep->simbrief->id])) }}"
|
|
|
|
class="btn btn-outline-info">View SimBrief</a>
|
|
|
|
@endif
|
|
|
|
|
2021-06-05 04:57:27 +08:00
|
|
|
@if(!$pirep->read_only && $user && $pirep->user_id === $user->id)
|
2020-03-23 21:31:35 +08:00
|
|
|
<div class="float-right" style="margin-bottom: 10px;">
|
|
|
|
<form method="get"
|
|
|
|
action="{{ route('frontend.pireps.edit', $pirep->id) }}"
|
|
|
|
style="display: inline">
|
|
|
|
@csrf
|
|
|
|
<button class="btn btn-outline-info">@lang('common.edit')</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<form method="post"
|
|
|
|
action="{{ route('frontend.pireps.submit', $pirep->id) }}"
|
|
|
|
style="display: inline">
|
|
|
|
@csrf
|
|
|
|
<button class="btn btn-outline-success">@lang('common.submit')</button>
|
|
|
|
</form>
|
2017-12-20 05:19:06 +08:00
|
|
|
</div>
|
2020-03-23 21:31:35 +08:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8">
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="row">
|
2018-04-05 06:42:43 +08:00
|
|
|
{{--
|
2020-02-02 02:05:56 +08:00
|
|
|
DEPARTURE INFO
|
2018-04-05 06:42:43 +08:00
|
|
|
--}}
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="col-6 text-left">
|
|
|
|
<h4>
|
|
|
|
{{$pirep->dpt_airport->location}}
|
|
|
|
</h4>
|
|
|
|
<p>
|
|
|
|
<a href="{{route('frontend.airports.show', $pirep->dpt_airport_id)}}">
|
|
|
|
{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})</a>
|
|
|
|
<br/>
|
|
|
|
@if($pirep->block_off_time)
|
|
|
|
{{ $pirep->block_off_time->toDayDateTimeString() }}
|
|
|
|
@endif
|
|
|
|
</p>
|
|
|
|
</div>
|
2018-04-05 06:42:43 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
{{--
|
|
|
|
ARRIVAL INFO
|
|
|
|
--}}
|
|
|
|
<div class="col-6 text-right">
|
|
|
|
<h4>
|
|
|
|
{{$pirep->arr_airport->location}}
|
|
|
|
</h4>
|
|
|
|
<p>
|
|
|
|
<a href="{{route('frontend.airports.show', $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() }}
|
2018-05-10 23:35:10 +08:00
|
|
|
@endif
|
2020-02-02 02:05:56 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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"
|
|
|
|
style="width: {{$pirep->progress_percent}}%;">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-30 00:04:28 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
@include('pireps.map')
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-30 00:04:28 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
{{--
|
2018-04-05 06:42:43 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
RIGHT SIDEBAR
|
2017-12-20 05:19:06 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
--}}
|
2018-03-30 03:10:49 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="col-4">
|
2020-03-02 04:51:00 +08:00
|
|
|
<table class="table table-striped">
|
2020-02-02 02:05:56 +08:00
|
|
|
<tr>
|
|
|
|
<td width="30%">@lang('common.state')</td>
|
|
|
|
<td>
|
|
|
|
<div class="badge badge-info">
|
|
|
|
{{ PirepState::label($pirep->state) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2020-03-23 21:31:35 +08:00
|
|
|
@if ($pirep->state !== PirepState::DRAFT)
|
2020-02-02 02:05:56 +08:00
|
|
|
<tr>
|
|
|
|
<td width="30%">@lang('common.status')</td>
|
|
|
|
<td>
|
|
|
|
<div class="badge badge-info">
|
|
|
|
{{ PirepStatus::label($pirep->status) }}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-03-23 21:31:35 +08:00
|
|
|
@endif
|
2020-02-02 02:05:56 +08:00
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>@lang('pireps.source')</td>
|
|
|
|
<td>{{ PirepSource::label($pirep->source) }}</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>@lang('flights.flighttype')</td>
|
|
|
|
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>@lang('pireps.filedroute')</td>
|
2021-03-18 04:43:36 +08:00
|
|
|
<td>{{ $pirep->route }}</td>
|
2020-02-02 02:05:56 +08:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>{{ trans_choice('common.note', 2) }}</td>
|
2021-03-18 04:43:36 +08:00
|
|
|
<td>{{ $pirep->notes }}</td>
|
2020-02-02 02:05:56 +08:00
|
|
|
</tr>
|
|
|
|
|
2021-03-18 04:43:36 +08:00
|
|
|
@if($pirep->score && $pirep->landing_rate)
|
|
|
|
<tr>
|
|
|
|
<td>Score</td>
|
|
|
|
<td>{{ $pirep->score }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Landing Rate</td>
|
|
|
|
<td>{{ number_format($pirep->landing_rate) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<tr>
|
|
|
|
<td>@lang('pireps.filedon')</td>
|
2021-03-18 04:43:36 +08:00
|
|
|
<td>{{ show_datetime($pirep->created_at) }}</td>
|
2020-02-02 02:05:56 +08:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2021-03-18 04:43:36 +08:00
|
|
|
@if(count($pirep->fields) > 0)
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="separator"></div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(count($pirep->fields) > 0)
|
|
|
|
<h5>{{ trans_choice('common.field', 2) }}</h5>
|
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
<thead>
|
|
|
|
<th>@lang('common.name')</th>
|
2020-02-24 06:21:26 +08:00
|
|
|
<th>{{ trans_choice('common.value', 1) }}</th>
|
2020-02-02 02:05:56 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($pirep->fields as $field)
|
|
|
|
<tr>
|
|
|
|
<td>{{ $field->name }}</td>
|
|
|
|
<td>{{ $field->value }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(count($pirep->fares) > 0)
|
|
|
|
<div class="separator"></div>
|
|
|
|
@endif
|
2017-12-20 05:19:06 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
{{--
|
|
|
|
Show the fares that have been entered
|
|
|
|
--}}
|
|
|
|
@if(count($pirep->fares) > 0)
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h5>{{ trans_choice('pireps.fare', 2) }}</h5>
|
|
|
|
<table class="table table-hover table-condensed">
|
|
|
|
<thead>
|
|
|
|
<th>@lang('pireps.class')</th>
|
|
|
|
<th>@lang('pireps.count')</th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($pirep->fares as $fare)
|
2017-12-24 01:58:17 +08:00
|
|
|
<tr>
|
2020-02-02 02:05:56 +08:00
|
|
|
<td>{{ $fare->fare->name }} ({{ $fare->fare->code }})</td>
|
|
|
|
<td>{{ $fare->count }}</td>
|
2017-12-24 01:58:17 +08:00
|
|
|
</tr>
|
2020-02-02 02:05:56 +08:00
|
|
|
@endforeach
|
|
|
|
</tbody>
|
2017-12-20 05:19:06 +08:00
|
|
|
</table>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2018-02-25 05:38:25 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
@endif
|
2018-04-04 08:21:42 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2018-02-25 05:38:25 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
@if(count($pirep->acars_logs) > 0)
|
|
|
|
<div class="separator"></div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h5>@lang('pireps.flightlog')</h5>
|
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<table class="table table-hover table-condensed" id="users-table">
|
|
|
|
<tbody>
|
2021-03-18 04:43:36 +08:00
|
|
|
@foreach($pirep->acars_logs->sortBy('created_at') as $log)
|
2020-02-02 02:05:56 +08:00
|
|
|
<tr>
|
|
|
|
<td nowrap="true">{{ show_datetime($log->created_at) }}</td>
|
|
|
|
<td>{{ $log->log }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2017-12-20 07:30:30 +08:00
|
|
|
|
2020-03-23 21:31:35 +08:00
|
|
|
@if(!empty($pirep->simbrief))
|
|
|
|
<div class="separator"></div>
|
|
|
|
<div class="row mt-5">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-container">
|
|
|
|
<h6><i class="fas fa-info-circle"></i>
|
|
|
|
OFP
|
|
|
|
</h6>
|
|
|
|
<div class="form-container-body border border-dark">
|
|
|
|
<div class="overflow-auto" style="height: 600px;">
|
|
|
|
{!! $pirep->simbrief->xml->text->plan_html !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@endsection
|