Field cleanup and some field details

This commit is contained in:
Nabeel Shahzad
2017-12-31 14:00:50 -06:00
parent 4cc08406fa
commit d93e461266
11 changed files with 140 additions and 89 deletions

View File

@@ -1,22 +1,12 @@
@extends('admin.app')
@section('title', 'Add Aircraft')
@section('content')
<section class="content-header">
<h1>Aircraft</h1>
</section>
<div class="content">
<div class="card border-blue-bottom">
<div class="content">
@include('admin.flash.message')
<div class="box box-primary">
<div class="box-body">
<div class="row">
{!! Form::open(['route' => 'admin.aircraft.store']) !!}
@include('admin.aircraft.fields')
{!! Form::close() !!}
</div>
</div>
{!! Form::open(['route' => 'admin.aircraft.store']) !!}
@include('admin.aircraft.fields')
{!! Form::close() !!}
</div>
</div>
@endsection

View File

@@ -1,41 +1,44 @@
<div class="row">
<!-- Name Field -->
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}
{!! Form::text('name', null, ['class' => 'form-control']) !!}
</div>
<!-- Name Field -->
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
{!! 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 select2', 'placeholder' => 'Select Subfleet']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('subfleet_id', 'Subfleet:') !!}
{!! Form::select('subfleet_id', $subfleets, null, ['class' => 'form-control select2', 'placeholder' => 'Select Subfleet']) !!}
</div>
<!-- Registration Field -->
<div class="form-group col-sm-6">
{!! Form::label('registration', 'Registration:') !!}
{!! Form::text('registration', null, ['class' => 'form-control']) !!}
</div>
<div class="row">
<!-- Registration Field -->
<div class="form-group col-sm-6">
{!! Form::label('registration', 'Registration:') !!}
{!! Form::text('registration', null, ['class' => 'form-control']) !!}
</div>
<!-- Tail Number Field -->
<div class="form-group col-sm-6">
{!! Form::label('tail_number', 'Tail Number:') !!}
{!! Form::text('tail_number', null, ['class' => 'form-control']) !!}
</div>
<!-- Active Field -->
<div class="form-group col-12">
{!! Form::label('active', 'Active:') !!}
<label class="checkbox-inline">
{!! Form::hidden('active', 0, false) !!}
{!! Form::checkbox('active', 1, null) !!}
</label>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
<a href="{!! route('admin.aircraft.index') !!}" class="btn btn-default">Cancel</a>
<!-- Tail Number Field -->
<div class="form-group col-sm-6">
{!! Form::label('tail_number', 'Tail Number:') !!}
{!! Form::text('tail_number', null, ['class' => 'form-control']) !!}
</div>
</div>
<div class="row">
<!-- Active Field -->
<div class="form-group col-12">
{!! Form::label('active', 'Active:') !!}
<label class="checkbox-inline">
{!! Form::hidden('active', 0, false) !!}
{!! Form::checkbox('active', 1, null) !!}
</label>
</div>
<!-- Submit Field -->
<div class="form-group col-sm-12">
<div class="pull-right">
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
<a href="{!! route('admin.aircraft.index') !!}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>

View File

@@ -1,31 +1,64 @@
<div class="row">
<div class="col-md-12">
<div class="callout callout-success">
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden,
so you can create default values that will apply to most of your subfleets, and change
them where they will differ.
</div>
<br />
</div>
</div>
<div class="row">
<div class="form-group col-sm-6">
{!! Form::label('code', 'Code:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
How this fare class will show up on a ticket
</div>
{!! Form::text('code', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
The fare class name, E.g, "Economy" or "First"
</div>
{!! Form::text('name', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('price', 'Price:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the price of a ticket for a passenger
</div>
{!! Form::text('price', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('cost', 'Cost:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
The operating cost
</div>
{!! Form::text('cost', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('capacity', 'Capacity:') !!}
<div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i>
The number of seats available in this class.
</div>
{!! Form::text('capacity', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6">
{!! Form::label('notes', 'Notes:') !!}
<div class="callout callout-info">
&nbsp;
</div>
{!! Form::text('notes', null, ['class' => 'form-control']) !!}
</div>

View File

@@ -17,7 +17,7 @@
<p>{!! $subfleet->type !!}</p>
</div>
<!-- Fuel Type Field -->
{{--<!-- Fuel Type Field -->
<div class="form-group">
{!! Form::label('fuel_type', 'Fuel Type:') !!}
<p>
@@ -31,7 +31,7 @@
-
@endif
</p>
</div>
</div>--}}
<!-- Created At Field -->
<div class="form-group">

View File

@@ -4,7 +4,7 @@
<th>Airline</th>
<th>Name</th>
<th>Type</th>
<th>Fuel Type</th>
{{--<th>Fuel Type</th>--}}
<th></th>
</thead>
<tbody>
@@ -13,7 +13,7 @@
<td>{!! $subfleet->airline->name !!}</td>
<td>{!! $subfleet->name !!}</td>
<td>{!! $subfleet->type !!}</td>
<td>
{{--<td>
@if($subfleet->fuel_type === config('enums.fuel_types.100LL'))
100LL
@elseif($subfleet->fuel_type === config('enums.fuel_types.JETA'))
@@ -23,7 +23,7 @@
@else
-
@endif
</td>
</td>--}}
<td class="text-right">
{!! Form::open(['route' => ['admin.subfleets.destroy', $subfleet->id], 'method' => 'delete']) !!}