@@ -1,21 +1,21 @@
|
||||
<tr>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm form-group">
|
||||
@if(!$field->read_only)
|
||||
{{ Form::text($field->slug, $field->value, [
|
||||
'class' => 'form-control',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
@else
|
||||
{{ $field->value }}
|
||||
@endif
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm form-group">
|
||||
@if(!$field->read_only)
|
||||
{{ Form::text($field->slug, $field->value, [
|
||||
'class' => 'form-control',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
@else
|
||||
{{ $field->value }}
|
||||
@endif
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@extends('app')
|
||||
@section('title', __('pireps.editflightreport'))
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>@lang('pireps.editflightreport')</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::model($pirep, [
|
||||
'route' => ['frontend.pireps.update', $pirep->id],
|
||||
'class' => 'form-group',
|
||||
'method' => 'patch']) }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>@lang('pireps.editflightreport')</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::model($pirep, [
|
||||
'route' => ['frontend.pireps.update', $pirep->id],
|
||||
'class' => 'form-group',
|
||||
'method' => 'patch']) }}
|
||||
|
||||
@include('pireps.fields')
|
||||
@include('pireps.fields')
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('pireps.scripts')
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@if($aircraft)
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-ellipsis-h"></i>
|
||||
{{ trans_choice('pireps.fare', 2) }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}}
|
||||
<div class="input-group form-group">
|
||||
{{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-ellipsis-h"></i>
|
||||
{{ trans_choice('pireps.fare', 2) }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}}
|
||||
<div class="input-group form-group">
|
||||
{{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
@section('title', trans_choice('common.pirep', 2))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="float:right;">
|
||||
<a class="btn btn-info pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('frontend.pireps.create') }}">@lang('pireps.filenewpirep')</a>
|
||||
</div>
|
||||
<h2>{{ trans_choice('pireps.pilotreport', 2) }}</h2>
|
||||
@include('flash::message')
|
||||
@include('pireps.table')
|
||||
<div style="float:right;">
|
||||
<a class="btn btn-info pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('frontend.pireps.create') }}">@lang('pireps.filenewpirep')</a>
|
||||
</div>
|
||||
<h2>{{ trans_choice('pireps.pilotreport', 2) }}</h2>
|
||||
@include('flash::message')
|
||||
@include('pireps.table')
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
{{ $pireps->links('pagination.default') }}
|
||||
{{ $pireps->links('pagination.default') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
phpvms.map.render_route_map({
|
||||
pirep_uri: '{!! url('/api/pireps/'.$pirep->id.'/acars/geojson') !!}',
|
||||
route_points: {!! json_encode($map_features['planned_rte_points']) !!},
|
||||
planned_route_line: {!! json_encode($map_features['planned_rte_line']) !!},
|
||||
actual_route_line: {!! json_encode($map_features['actual_route_line']) !!},
|
||||
actual_route_points: {!! json_encode($map_features['actual_route_points']) !!},
|
||||
aircraft_icon: '{!! public_asset('/assets/img/acars/aircraft.png') !!}',
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
phpvms.map.render_route_map({
|
||||
pirep_uri: '{!! url('/api/pireps/'.$pirep->id.'/acars/geojson') !!}',
|
||||
route_points: {!! json_encode($map_features['planned_rte_points']) !!},
|
||||
planned_route_line: {!! json_encode($map_features['planned_rte_line']) !!},
|
||||
actual_route_line: {!! json_encode($map_features['actual_route_line']) !!},
|
||||
actual_route_points: {!! json_encode($map_features['actual_route_points']) !!},
|
||||
aircraft_icon: '{!! public_asset('/assets/img/acars/aircraft.png') !!}',
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,66 +1,68 @@
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card-block" style="min-height: 0px">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="float-right">
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}" class="btn btn-sm btn-info">@lang('common.edit')</a>
|
||||
</p>
|
||||
<h5>
|
||||
<a href="{{ route('frontend.pireps.show', [$pirep->id]) }}">
|
||||
{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
||||
-
|
||||
{{ $pirep->dpt_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
<div class="card-block" style="min-height: 0px">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="float-right">
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}"
|
||||
class="btn btn-sm btn-info">@lang('common.edit')</a>
|
||||
</p>
|
||||
<h5>
|
||||
<a href="{{ route('frontend.pireps.show', [$pirep->id]) }}">
|
||||
{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
||||
-
|
||||
{{ $pirep->dpt_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $pirep->dpt_airport->icao
|
||||
])}}">{{$pirep->dpt_airport->icao}}</a>)
|
||||
<span class="description">to</span>
|
||||
{{ $pirep->arr_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
<span class="description">to</span>
|
||||
{{ $pirep->arr_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $pirep->arr_airport->icao
|
||||
])}}">{{$pirep->arr_airport->icao}}</a>)
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-2 text-center">
|
||||
<div>
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
@elseif($pirep->state === PirepState::REJECTED)
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-2 text-center">
|
||||
<div>
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
@elseif($pirep->state === PirepState::REJECTED)
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
<div class="badge badge-info">
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table-condensed" width="100%">
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.flighttime') </span></td>
|
||||
<td>{{ Utils::minutesToTimeString($pirep->flight_time) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('common.aircraft') </span></td>
|
||||
<td>{{ $pirep->aircraft->name }}
|
||||
({{ $pirep->aircraft->registration }})</td>
|
||||
</tr>
|
||||
@if($pirep->level)
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.flightlevel') </span></td>
|
||||
<td>{{ $pirep->level }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.filedon'): </span></td>
|
||||
<td>{{ show_datetime($pirep->created_at) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table-condensed" width="100%">
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.flighttime') </span></td>
|
||||
<td>{{ Utils::minutesToTimeString($pirep->flight_time) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('common.aircraft') </span></td>
|
||||
<td>{{ $pirep->aircraft->name }}
|
||||
({{ $pirep->aircraft->registration }})
|
||||
</td>
|
||||
</tr>
|
||||
@if($pirep->level)
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.flightlevel') </span></td>
|
||||
<td>{{ $pirep->level }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td nowrap><span class="title">@lang('pireps.filedon'): </span></td>
|
||||
<td>{{ show_datetime($pirep->created_at) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
const select_id = "select#aircraft_select";
|
||||
const destContainer = $('#fares_container');
|
||||
<script>
|
||||
const select_id = "select#aircraft_select";
|
||||
const destContainer = $('#fares_container');
|
||||
|
||||
$(select_id).change(e => {
|
||||
const aircraft_id = $(select_id + ' option:selected').val();
|
||||
const url = '/pireps/fares?aircraft_id=' + aircraft_id;
|
||||
console.log('aircraft select change: ', aircraft_id);
|
||||
$(select_id).change(e => {
|
||||
const aircraft_id = $(select_id + ' option:selected').val();
|
||||
const url = '/pireps/fares?aircraft_id=' + aircraft_id;
|
||||
console.log('aircraft select change: ', aircraft_id);
|
||||
|
||||
phpvms.request(url).then(response => {
|
||||
phpvms.request(url).then(response => {
|
||||
destContainer.html(response.data);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -2,220 +2,220 @@
|
||||
@section('title', trans_choice('common.pirep', 1).' '.$pirep->ident)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
|
||||
</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', $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>
|
||||
|
||||
{{--
|
||||
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() }}
|
||||
@endif
|
||||
</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>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('pireps.map')
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
|
||||
</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', $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>
|
||||
|
||||
{{--
|
||||
|
||||
RIGHT SIDEBAR
|
||||
|
||||
ARRIVAL INFO
|
||||
--}}
|
||||
|
||||
<div class="col-4">
|
||||
|
||||
<h2> </h2>
|
||||
|
||||
{{-- 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', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-info">@lang('common.edit')</button>
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{{ route('frontend.pireps.submit', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-success">@lang('common.submit')</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<td width="30%">@lang('common.state')</td>
|
||||
<td>
|
||||
<div class="badge badge-info">
|
||||
{{ PirepState::label($pirep->state) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30%">@lang('common.status')</td>
|
||||
<td>
|
||||
<div class="badge badge-info">
|
||||
{{ PirepStatus::label($pirep->status) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<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>
|
||||
<td>
|
||||
{{ $pirep->route }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans_choice('common.note', 2) }}</td>
|
||||
<td>
|
||||
{{ $pirep->notes }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>@lang('pireps.filedon')</td>
|
||||
<td>
|
||||
{{ show_datetime($pirep->created_at) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@if(count($pirep->fields) > 0 || count($pirep->fares) > 0)
|
||||
<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>
|
||||
<th>@lang('common.value')</th>
|
||||
</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
|
||||
|
||||
{{--
|
||||
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)
|
||||
<tr>
|
||||
<td>{{ $fare->fare->name }} ({{ $fare->fare->code }})</td>
|
||||
<td>{{ $fare->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<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() }}
|
||||
@endif
|
||||
</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>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@include('pireps.map')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@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>
|
||||
@foreach($pirep->acars_logs as $log)
|
||||
<tr>
|
||||
<td nowrap="true">{{ show_datetime($log->created_at) }}</td>
|
||||
<td>{{ $log->log }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{--
|
||||
|
||||
RIGHT SIDEBAR
|
||||
|
||||
--}}
|
||||
|
||||
<div class="col-4">
|
||||
|
||||
<h2> </h2>
|
||||
|
||||
{{-- 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', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-info">@lang('common.edit')</button>
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{{ route('frontend.pireps.submit', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-success">@lang('common.submit')</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<td width="30%">@lang('common.state')</td>
|
||||
<td>
|
||||
<div class="badge badge-info">
|
||||
{{ PirepState::label($pirep->state) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30%">@lang('common.status')</td>
|
||||
<td>
|
||||
<div class="badge badge-info">
|
||||
{{ PirepStatus::label($pirep->status) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<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>
|
||||
<td>
|
||||
{{ $pirep->route }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans_choice('common.note', 2) }}</td>
|
||||
<td>
|
||||
{{ $pirep->notes }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>@lang('pireps.filedon')</td>
|
||||
<td>
|
||||
{{ show_datetime($pirep->created_at) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@if(count($pirep->fields) > 0 || count($pirep->fares) > 0)
|
||||
<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>
|
||||
<th>@lang('common.value')</th>
|
||||
</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
|
||||
|
||||
{{--
|
||||
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)
|
||||
<tr>
|
||||
<td>{{ $fare->fare->name }} ({{ $fare->fare->code }})</td>
|
||||
<td>{{ $fare->count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@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>
|
||||
@foreach($pirep->acars_logs as $log)
|
||||
<tr>
|
||||
<td nowrap="true">{{ show_datetime($log->created_at) }}</td>
|
||||
<td>{{ $log->log }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('common.flight', 1) }}</th>
|
||||
<th>@lang('common.departure')</th>
|
||||
<th>@lang('common.arrival')</th>
|
||||
<th>@lang('common.aircraft')</th>
|
||||
<th class="text-center">@lang('flights.flighttime')</th>
|
||||
<th class="text-center">@lang('common.status')</th>
|
||||
<th>@lang('pireps.submitted')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('common.flight', 1) }}</th>
|
||||
<th>@lang('common.departure')</th>
|
||||
<th>@lang('common.arrival')</th>
|
||||
<th>@lang('common.aircraft')</th>
|
||||
<th class="text-center">@lang('flights.flighttime')</th>
|
||||
<th class="text-center">@lang('common.status')</th>
|
||||
<th>@lang('pireps.submitted')</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($pireps as $pirep)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('frontend.pireps.show', [
|
||||
@foreach($pireps as $pirep)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('frontend.pireps.show', [
|
||||
$pirep->id]) }}">{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->aircraft)
|
||||
{{ $pirep->aircraft->name }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->aircraft)
|
||||
{{ $pirep->aircraft->name }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if($pirep->state === PirepState::PENDING)
|
||||
<div class="badge badge-warning">
|
||||
@elseif($pirep->state === PirepState::ACCEPTED)
|
||||
<div class="badge badge-success">
|
||||
@elseif($pirep->state === PirepState::REJECTED)
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
<div class="badge badge-info">
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</td>
|
||||
<td>
|
||||
@if(filled($pirep->submitted_at))
|
||||
{{ $pirep->submitted_at->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}"
|
||||
class="btn btn-info btn-sm"
|
||||
style="z-index: 9999"
|
||||
title="@lang('common.edit')">
|
||||
@lang('common.edit')
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<div class="badge badge-danger">
|
||||
@else
|
||||
<div class="badge badge-info">
|
||||
@endif
|
||||
{{ PirepState::label($pirep->state) }}</div>
|
||||
</td>
|
||||
<td>
|
||||
@if(filled($pirep->submitted_at))
|
||||
{{ $pirep->submitted_at->diffForHumans() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}"
|
||||
class="btn btn-info btn-sm"
|
||||
style="z-index: 9999"
|
||||
title="@lang('common.edit')">
|
||||
@lang('common.edit')
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user