Aircraft can be added without subfleet/block subfleet deletion if still in use #128
This commit is contained in:
@@ -3,9 +3,15 @@
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{!! Form::open(['route' => 'admin.aircraft.store']) !!}
|
||||
@include('admin.aircraft.fields')
|
||||
{!! Form::close() !!}
|
||||
@if(!filled($subfleets))
|
||||
<p class="text-center">
|
||||
You must add a subfleet before you can add an aircraft!
|
||||
</p>
|
||||
@else
|
||||
{!! Form::open(['route' => 'admin.aircraft.store']) !!}
|
||||
@include('admin.aircraft.fields')
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@foreach($aircraft as $ac)
|
||||
<tr>
|
||||
<td>
|
||||
@if($ac->subfleet_id)
|
||||
@if($ac->subfleet_id && $ac->subfleet)
|
||||
<a href="{!! route('admin.subfleets.edit', [$ac->subfleet_id]) !!}">
|
||||
{!! $ac->subfleet->name !!}
|
||||
</a>
|
||||
@@ -23,8 +23,8 @@
|
||||
<td style="text-align: center;">{!! $ac->icao !!}</td>
|
||||
<td style="text-align: center;">{!! $ac->registration !!}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($ac->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@if($ac->active == GenericState::ACTIVE)
|
||||
<span class="label label-success">{!! GenericState::label($ac->active); !!}</span>
|
||||
@else
|
||||
<span class="label label-default">Inactive</span>
|
||||
@endif
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{!! Form::open(['route' => 'admin.subfleets.store']) !!}
|
||||
@include('admin.subfleets.fields')
|
||||
{!! Form::close() !!}
|
||||
@if(!filled($airlines))
|
||||
<p class="text-center">
|
||||
You must add an airline before you can add a subfleet!
|
||||
</p>
|
||||
@else
|
||||
{!! Form::open(['route' => 'admin.subfleets.store']) !!}
|
||||
@include('admin.subfleets.fields')
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user