2017-08-25 02:37:54 +08:00
|
|
|
@foreach($pireps as $pirep)
|
|
|
|
<div class="card border-blue-bottom">
|
|
|
|
<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]) !!}">
|
|
|
|
{!! $pirep->airline->code !!}
|
|
|
|
@if($pirep->flight_id)
|
|
|
|
{!! $pirep->flight->flight_number !!}
|
|
|
|
@else
|
|
|
|
{!! $pirep->flight_number !!}
|
|
|
|
@endif
|
|
|
|
</a>
|
|
|
|
</h5>
|
|
|
|
<div>
|
|
|
|
@if($pirep->status == config('enums.pirep_status.PENDING'))
|
|
|
|
<div class="badge badge-warning">Pending</div>
|
|
|
|
@elseif($pirep->status == config('enums.pirep_status.ACCEPTED'))
|
|
|
|
<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">
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<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>
|
|
|
|
{!! Utils::secondsToTime($pirep->flight_time) !!}
|
|
|
|
</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>
|
|
|
|
{!! $pirep->created_at !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<span class="description">more data </span>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<span class="description">more data </span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-25 02:57:22 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 text-right">
|
|
|
|
<button href="#" class="btn btn-info">Accept</button>
|
|
|
|
<button href="#" class="btn btn-danger">Reject</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-25 02:37:54 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
{{--
|
2017-08-24 03:59:15 +08:00
|
|
|
<table class="table table-hover table-responsive" id="pireps-table">
|
2017-06-29 08:54:05 +08:00
|
|
|
<thead>
|
2017-07-03 10:25:48 +08:00
|
|
|
<th>Pilot</th>
|
|
|
|
<th>Flight</th>
|
|
|
|
<th>Aircraft</th>
|
2017-06-29 08:54:05 +08:00
|
|
|
<th>Flight Time</th>
|
|
|
|
<th>Level</th>
|
2017-08-24 03:59:15 +08:00
|
|
|
<th></th>
|
2017-06-29 08:54:05 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($pireps as $pirep)
|
|
|
|
<tr>
|
2017-07-03 10:25:48 +08:00
|
|
|
<td>{!! $pirep->user->name !!}</td>
|
|
|
|
<td>
|
|
|
|
@if($pirep->flight)
|
|
|
|
<a href="{!! route('admin.flights.show', ['id' => $pirep->flight_id]) !!}">
|
|
|
|
{!! $pirep->flight->airline->code !!}{!! $pirep->flight->flight_number !!}
|
|
|
|
</a>
|
|
|
|
@else
|
|
|
|
-
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>{!! $pirep->aircraft->registration !!} ({!! $pirep->aircraft->name !!})</td>
|
|
|
|
<td>{!! Utils::secondsToTime($pirep->flight_time) !!}</td>
|
2017-06-29 08:54:05 +08:00
|
|
|
<td>{!! $pirep->level !!}</td>
|
2017-07-14 11:09:38 +08:00
|
|
|
<td style="text-align: right;">
|
2017-06-29 08:54:05 +08:00
|
|
|
{!! Form::open(['route' => ['admin.pireps.destroy', $pirep->id], 'method' => 'delete']) !!}
|
|
|
|
<div class='btn-group'>
|
|
|
|
<a href="{!! route('admin.pireps.show', [$pirep->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
|
|
|
|
<a href="{!! route('admin.pireps.edit', [$pirep->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
|
|
|
|
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
|
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2017-07-03 10:25:48 +08:00
|
|
|
@if($pirep->notes)
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td colspan="8"><strong>Notes:</strong> {!! $pirep->notes !!}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2017-06-29 08:54:05 +08:00
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-08-25 02:37:54 +08:00
|
|
|
--}}
|