#32 assign aircraft to subfleets, and aircraft to subfleets

This commit is contained in:
Nabeel Shahzad
2017-06-23 17:33:18 -05:00
parent b9d49a4af9
commit c3e417429a
27 changed files with 113 additions and 158 deletions

View File

@@ -10,6 +10,11 @@
{!! Form::text('name', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('subfleet_id', 'Subfleet:') !!}
{!! Form::select('subfleet_id', $subfleets, null, ['class' => 'form-control', 'placeholder' => 'Select Subfleet']) !!}
</div>
<!-- Registration Field -->
<div class="form-group col-sm-6">
{!! Form::label('registration', 'Registration:') !!}

View File

@@ -6,7 +6,10 @@
<h3 class="box-title">{!! Form::label('icao', 'ICAO') !!}</h3>
</div>
<div class="box-body">
<p class="lead">{!! $aircraft->icao !!}/<strong>{!! $aircraft->class->code !!}</strong> ({!! $aircraft->class->name !!})</p>
<p class="lead">{!! $aircraft->icao !!}
@if($aircraft->subfleet)
/{!! $aircraft->subfleet->name !!}</p>
@endif
</div>
</div>
</div>

View File

@@ -2,6 +2,7 @@
<thead>
<th>ICAO</th>
<th>Name</th>
<th>Subfleet</th>
<th>Registration</th>
<th style="text-align: center;">Active</th>
<th style="text-align: center;">Actions</th>
@@ -11,6 +12,13 @@
<tr>
<td><a href="{!! route('admin.aircraft.show', [$ac->id]) !!}">{!! $ac->icao !!}</a></td>
<td>{!! $ac->name !!}</td>
<td>
@if($ac->subfleet)
{!! $ac->subfleet->name !!}
@else
-
@endif
</td>
<td>{!! $ac->registration !!}</td>
<td style="text-align: center;">
<i class="fa fa-{{$ac->active == 1?"check":""}}-square-o" aria-hidden="true"