2018-04-10 11:04:59 +08:00
|
|
|
{{--@each('pireps.pirep_card', $pireps, 'pirep')--}}
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2018-04-10 11:04:59 +08:00
|
|
|
<table class="table table-condensed table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2018-05-19 03:18:12 +08:00
|
|
|
<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('common.flighttime')</th>
|
|
|
|
<th class="text-center">@lang('common.status')</th>
|
2018-05-18 06:03:30 +08:00
|
|
|
<th>@lang('frontend.pireps.submitted')</th>
|
2018-04-10 11:04:59 +08:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
@foreach($pireps as $pirep)
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{ route('frontend.pireps.show', [
|
|
|
|
$pirep->id]) }}">{{ $pirep->airline->code }}{{ $pirep->ident }}</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ $pirep->dpt_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $pirep->dpt_airport->icao
|
|
|
|
])}}">{{$pirep->dpt_airport->icao}}</a>)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ $pirep->arr_airport->name }}
|
|
|
|
(<a href="{{route('frontend.airports.show', [
|
|
|
|
'id' => $pirep->arr_airport->icao
|
|
|
|
])}}">{{$pirep->arr_airport->icao}}</a>)
|
|
|
|
</td>
|
|
|
|
<td>{{ $pirep->aircraft->name }}</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>
|
2018-05-01 06:51:18 +08:00
|
|
|
@if(filled($pirep->submitted_at))
|
|
|
|
{{ $pirep->submitted_at->diffForHumans() }}
|
|
|
|
@endif
|
2018-04-10 11:04:59 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if(!$pirep->read_only)
|
|
|
|
<a href="{{ route('frontend.pireps.edit', [
|
|
|
|
'id' => $pirep->id,
|
2018-05-19 03:18:12 +08:00
|
|
|
]) }}">@lang('common.edit')</a>
|
2018-04-10 11:04:59 +08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|