#41 add fuel type to subfleet table

This commit is contained in:
Nabeel Shahzad
2017-07-05 09:55:36 -05:00
parent cdd315f8bb
commit e6b338cd32
7 changed files with 59 additions and 14 deletions

View File

@@ -194,6 +194,11 @@
{{-- <script src="/vendor/openlayers/ol.js"></script> --}}
<script src="/js/admin/admin.js"></script>
<script>
$(document).ready(function () {
$(".select2").select2();
});
</script>
@yield('scripts')
</body>
</html>

View File

@@ -1,21 +1,27 @@
<!-- Airline Id Field -->
<div class="form-group col-sm-4">
<div class="form-group col-sm-6">
{!! Form::label('airline_id', 'Airline Id:') !!}
{!! Form::select('airline_id', $airlines, null , ['class' => 'form-control']) !!}
{!! Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) !!}
</div>
<!-- Name Field -->
<div class="form-group col-sm-4">
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}
{!! Form::text('name', null, ['class' => 'form-control']) !!}
</div>
<!-- Type Field -->
<div class="form-group col-sm-4">
<div class="form-group col-sm-6">
{!! Form::label('type', 'Type:') !!}
{!! Form::text('type', null, ['class' => 'form-control']) !!}
</div>
<!-- Fuel Type Field -->
<div class="form-group col-sm-6">
{!! Form::label('fuel_type', 'Fuel Type:') !!}
{!! Form::select('fuel_type', $fuel_types, null , ['class' => 'form-control select2']) !!}
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">

View File

@@ -17,6 +17,22 @@
<p>{!! $subfleet->type !!}</p>
</div>
<!-- Fuel Type Field -->
<div class="form-group">
{!! Form::label('fuel_type', 'Fuel Type:') !!}
<p>
@if($subfleet->fuel_type === config('enums.fuel_types.100LL'))
100LL
@elseif($subfleet->fuel_type === config('enums.fuel_types.JETA'))
JETA
@elseif($subfleet->fuel_type === config('enums.fuel_types.MOGAS'))
MOGAS
@else
-
@endif
</p>
</div>
<!-- Created At Field -->
<div class="form-group">
{!! Form::label('created_at', 'Created At:') !!}

View File

@@ -3,6 +3,7 @@
<th>Airline</th>
<th>Name</th>
<th>Type</th>
<th>Fuel Type</th>
<th colspan="3">Action</th>
</thead>
<tbody>
@@ -11,6 +12,17 @@
<td>{!! $subfleet->airline->name !!}</td>
<td>{!! $subfleet->name !!}</td>
<td>{!! $subfleet->type !!}</td>
<td>
@if($subfleet->fuel_type === config('enums.fuel_types.100LL'))
100LL
@elseif($subfleet->fuel_type === config('enums.fuel_types.JETA'))
JETA
@elseif($subfleet->fuel_type === config('enums.fuel_types.MOGAS'))
MOGAS
@else
-
@endif
</td>
<td>
{!! Form::open(['route' => ['admin.subfleets.destroy', $subfleet->id], 'method' => 'delete']) !!}
<div class='btn-group'>