2017-12-03 14:48:33 +08:00
|
|
|
<div id="pirep_{!! $pirep->id !!}_container">
|
|
|
|
<div class="card border-blue-bottom pirep_card_container">
|
|
|
|
<div class="card-block" style="min-height: 0px">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2 text-center">
|
|
|
|
<h5>
|
|
|
|
<a class="text-c"
|
|
|
|
href="{!! route('admin.pireps.show', [$pirep->id]) !!}">
|
2017-12-20 23:05:56 +08:00
|
|
|
{!! $pirep->ident !!}
|
2017-12-03 14:48:33 +08:00
|
|
|
</a>
|
|
|
|
</h5>
|
|
|
|
<div>
|
2017-12-20 10:19:36 +08:00
|
|
|
@if($pirep->state == PirepState::PENDING)
|
2017-12-03 14:48:33 +08:00
|
|
|
<div class="badge badge-warning">Pending</div>
|
2017-12-20 10:19:36 +08:00
|
|
|
@elseif($pirep->state === PirepState::ACCEPTED)
|
2017-12-03 14:48:33 +08:00
|
|
|
<div class="badge badge-success">Accepted</div>
|
|
|
|
@else
|
|
|
|
<div class="badge badge-danger">Rejected</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="row">
|
2017-12-24 01:58:17 +08:00
|
|
|
<div class="col-sm-6">
|
2017-12-03 14:48:33 +08:00
|
|
|
<div>
|
|
|
|
<span class="description">DEP </span>
|
|
|
|
{!! $pirep->dpt_airport->icao !!}
|
|
|
|
<span class="description">ARR </span>
|
|
|
|
{!! $pirep->arr_airport->icao !!}
|
|
|
|
</div>
|
|
|
|
<div><span class="description">Flight Time </span>
|
2017-12-16 08:02:35 +08:00
|
|
|
{!! Utils::minutesToTimeString($pirep->flight_time) !!}
|
2017-12-03 14:48:33 +08:00
|
|
|
</div>
|
|
|
|
<div><span class="description">Aircraft </span>
|
|
|
|
{!! $pirep->aircraft->registration !!}
|
|
|
|
({!! $pirep->aircraft->name !!})
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<span class="description">Flight Level </span>
|
|
|
|
{!! $pirep->level !!}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<span class="description">File Date </span>
|
2017-12-24 01:58:17 +08:00
|
|
|
{!! show_datetime($pirep->created_at) !!}
|
2017-12-03 14:48:33 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-24 01:58:17 +08:00
|
|
|
<div class="col-sm-6">
|
2017-12-03 14:48:33 +08:00
|
|
|
<span class="description">more data </span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 ">
|
|
|
|
<table class="pull-right">
|
2017-12-04 05:29:34 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
2017-12-20 10:19:36 +08:00
|
|
|
@if($pirep->state == PirepState::PENDING
|
|
|
|
|| $pirep->state == PirepState::REJECTED)
|
2017-12-04 05:29:34 +08:00
|
|
|
{!! Form::open(['url' => '/admin/pireps/'.$pirep->id.'/status', 'method' => 'post',
|
|
|
|
'name' => 'accept_'.$pirep->id,
|
|
|
|
'id' => $pirep->id.'_accept',
|
|
|
|
'pirep_id' => $pirep->id,
|
2017-12-20 10:19:36 +08:00
|
|
|
'new_status' => PirepState::ACCEPTED,
|
2017-12-04 05:29:34 +08:00
|
|
|
'class' => 'pirep_submit_status']) !!}
|
|
|
|
{!! Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-info']) !!}
|
|
|
|
{!! Form::close() !!}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
2017-12-20 10:19:36 +08:00
|
|
|
@if($pirep->state == PirepState::PENDING
|
|
|
|
|| $pirep->state == PirepState::ACCEPTED)
|
2017-12-04 05:29:34 +08:00
|
|
|
{!! Form::open(['url' => '/admin/pireps/'.$pirep->id.'/status', 'method' => 'post',
|
|
|
|
'name' => 'reject_'.$pirep->id,
|
|
|
|
'id' => $pirep->id.'_reject',
|
|
|
|
'pirep_id' => $pirep->id,
|
2017-12-20 10:19:36 +08:00
|
|
|
'new_status' => PirepState::REJECTED,
|
2017-12-04 05:29:34 +08:00
|
|
|
'class' => 'pirep_submit_status']) !!}
|
|
|
|
{!! Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-danger']) !!}
|
|
|
|
{!! Form::close() !!}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
<a href="{!! route('admin.pireps.edit', [$pirep->id]) !!}"
|
|
|
|
class='btn btn-sm btn-success btn-icon'>
|
|
|
|
<i class="fa fa-pencil-square-o"></i></a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2017-12-03 14:48:33 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|