2019-09-17 03:17:51 +08:00
|
|
|
<div class="table-responsive">
|
2020-03-02 04:51:00 +08:00
|
|
|
<table class="table table-hover table-striped">
|
2020-02-02 02:05:56 +08:00
|
|
|
<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>
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
@foreach($pireps as $pirep)
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{ route('frontend.pireps.show', [
|
2019-09-17 03:17:51 +08:00
|
|
|
$pirep->id]) }}">{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
2020-02-02 02:05:56 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
2019-09-17 03:17:51 +08:00
|
|
|
(<a href="{{route('frontend.airports.show', [$pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
2020-02-02 02:05:56 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
2019-09-17 03:17:51 +08:00
|
|
|
(<a href="{{route('frontend.airports.show', [$pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
2020-02-02 02:05:56 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if($pirep->aircraft)
|
|
|
|
{{ $pirep->aircraft->name }}
|
|
|
|
@else
|
|
|
|
-
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td class="text-center">
|
2020-03-02 04:51:00 +08:00
|
|
|
@minutestotime($pirep->flight_time)
|
2020-02-02 02:05:56 +08:00
|
|
|
</td>
|
|
|
|
<td class="text-center">
|
2020-03-23 21:31:35 +08:00
|
|
|
@php
|
|
|
|
$color = 'badge-info';
|
|
|
|
if($pirep->state === PirepState::PENDING) {
|
|
|
|
$color = 'badge-warning';
|
|
|
|
} elseif ($pirep->state === PirepState::ACCEPTED) {
|
|
|
|
$color = 'badge-success';
|
|
|
|
} elseif ($pirep->state === PirepState::REJECTED) {
|
|
|
|
$color = 'badge-danger';
|
|
|
|
}
|
|
|
|
@endphp
|
|
|
|
<div class="badge {{ $color }}">{{ PirepState::label($pirep->state) }}</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</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]) }}"
|
2020-03-23 21:31:35 +08:00
|
|
|
class="btn btn-outline-info btn-sm"
|
2020-02-02 02:05:56 +08:00
|
|
|
style="z-index: 9999"
|
|
|
|
title="@lang('common.edit')">
|
|
|
|
@lang('common.edit')
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2018-04-10 11:04:59 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
</tbody>
|
2019-09-17 03:17:51 +08:00
|
|
|
</table>
|
|
|
|
</div>
|