Add ground_handling_cost to airport #134
This commit is contained in:
@@ -25,8 +25,9 @@ $factory->define(App\Models\Airport::class, function (Faker $faker) {
|
|||||||
'timezone' => $faker->timezone,
|
'timezone' => $faker->timezone,
|
||||||
'lat' => $faker->latitude,
|
'lat' => $faker->latitude,
|
||||||
'lon' => $faker->longitude,
|
'lon' => $faker->longitude,
|
||||||
'fuel_100ll_cost' => $faker->randomFloat(2),
|
'ground_handling_cost' => $faker->randomFloat(2, 0, 500),
|
||||||
'fuel_jeta_cost' => $faker->randomFloat(2),
|
'fuel_100ll_cost' => $faker->randomFloat(2, 0, 100),
|
||||||
'fuel_mogas_cost' => $faker->randomFloat(2),
|
'fuel_jeta_cost' => $faker->randomFloat(2, 0, 100),
|
||||||
|
'fuel_mogas_cost' => $faker->randomFloat(2, 0, 100),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class CreateAirportsTable extends Migration
|
|||||||
$table->string('country', 64)->nullable();
|
$table->string('country', 64)->nullable();
|
||||||
$table->string('timezone', 64)->nullable();
|
$table->string('timezone', 64)->nullable();
|
||||||
$table->boolean('hub')->default(false);
|
$table->boolean('hub')->default(false);
|
||||||
|
$table->unsignedDecimal('ground_handling_cost')->nullable()->default(0);
|
||||||
$table->unsignedDecimal('fuel_100ll_cost')->nullable()->default(0);
|
$table->unsignedDecimal('fuel_100ll_cost')->nullable()->default(0);
|
||||||
$table->unsignedDecimal('fuel_jeta_cost')->nullable()->default(0);
|
$table->unsignedDecimal('fuel_jeta_cost')->nullable()->default(0);
|
||||||
$table->unsignedDecimal('fuel_mogas_cost')->nullable()->default(0);
|
$table->unsignedDecimal('fuel_mogas_cost')->nullable()->default(0);
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ airports:
|
|||||||
lat: 30.1945278
|
lat: 30.1945278
|
||||||
lon: -97.6698889
|
lon: -97.6698889
|
||||||
hub: 1
|
hub: 1
|
||||||
|
ground_handling_cost: 100
|
||||||
- id: KJFK
|
- id: KJFK
|
||||||
iata: JFK
|
iata: JFK
|
||||||
icao: KJFK
|
icao: KJFK
|
||||||
@@ -125,51 +126,7 @@ airports:
|
|||||||
lat: 40.6399257
|
lat: 40.6399257
|
||||||
lon: -73.7786950
|
lon: -73.7786950
|
||||||
hub: 1
|
hub: 1
|
||||||
- id: KBWI
|
ground_handling_cost: 250
|
||||||
iata: BWI
|
|
||||||
icao: KBWI
|
|
||||||
name: Baltimore/Washington International Thurgood Marshall Airport
|
|
||||||
location: Baltimore, MD
|
|
||||||
country: United States
|
|
||||||
timezone: America/New_York
|
|
||||||
lat: 39.1754
|
|
||||||
lon: -76.6683
|
|
||||||
- id: KIAH
|
|
||||||
iata: IAH
|
|
||||||
icao: KIAH
|
|
||||||
name: George Bush Intercontinental Houston Airport
|
|
||||||
location: Houston, TX
|
|
||||||
country: United States
|
|
||||||
timezone: America/Chicago
|
|
||||||
lat: 29.9844
|
|
||||||
lon: -95.3414
|
|
||||||
- id: KORD
|
|
||||||
iata: ORD
|
|
||||||
icao: KORD
|
|
||||||
name: Chicago O'Hare International Airport
|
|
||||||
location: Chicago, IL
|
|
||||||
country: United States
|
|
||||||
timezone: America/Chicago
|
|
||||||
lat: 41.9786
|
|
||||||
lon: -87.9048
|
|
||||||
- id: KDFW
|
|
||||||
iata: DFW
|
|
||||||
icao: KDFW
|
|
||||||
name: Dallas Fort Worth International Airport
|
|
||||||
location: Dallas, TX
|
|
||||||
country: United States
|
|
||||||
timezone: America/Chicago
|
|
||||||
lat: 32.8968
|
|
||||||
lon: -97.038
|
|
||||||
- id: EFHK
|
|
||||||
iata: HEL
|
|
||||||
icao: EFHK
|
|
||||||
name: Helsinki Vantaa Airport
|
|
||||||
location: Helsinki
|
|
||||||
country: Finland
|
|
||||||
timezone: Europe/Helsinki
|
|
||||||
lat: 60.3172
|
|
||||||
lon: 24.9633
|
|
||||||
- id: EGLL
|
- id: EGLL
|
||||||
iata: LHR
|
iata: LHR
|
||||||
icao: EGLL
|
icao: EGLL
|
||||||
@@ -178,6 +135,7 @@ airports:
|
|||||||
timezone: Europe/London
|
timezone: Europe/London
|
||||||
lat: 51.4775
|
lat: 51.4775
|
||||||
lon: -0.4614
|
lon: -0.4614
|
||||||
|
ground_handling_cost: 500
|
||||||
- id: LGRP
|
- id: LGRP
|
||||||
iata: RHO
|
iata: RHO
|
||||||
icao: LGRP
|
icao: LGRP
|
||||||
@@ -187,6 +145,7 @@ airports:
|
|||||||
timezone: Europe/Athens
|
timezone: Europe/Athens
|
||||||
lat: 36.4054
|
lat: 36.4054
|
||||||
lon: 28.0862
|
lon: 28.0862
|
||||||
|
ground_handling_cost: 50
|
||||||
#
|
#
|
||||||
aircraft:
|
aircraft:
|
||||||
- id: 1
|
- id: 1
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class Airport extends BaseModel
|
|||||||
'lon',
|
'lon',
|
||||||
'hub',
|
'hub',
|
||||||
'timezone',
|
'timezone',
|
||||||
|
'ground_handling_cost',
|
||||||
'fuel_100ll_cost',
|
'fuel_100ll_cost',
|
||||||
'fuel_jeta_cost',
|
'fuel_jeta_cost',
|
||||||
'fuel_mogas_cost',
|
'fuel_mogas_cost',
|
||||||
@@ -36,6 +37,7 @@ class Airport extends BaseModel
|
|||||||
'lat' => 'float',
|
'lat' => 'float',
|
||||||
'lon' => 'float',
|
'lon' => 'float',
|
||||||
'hub' => 'boolean',
|
'hub' => 'boolean',
|
||||||
|
'ground_handling_cost' => 'float',
|
||||||
'fuel_100ll_cost' => 'float',
|
'fuel_100ll_cost' => 'float',
|
||||||
'fuel_jeta_cost' => 'float',
|
'fuel_jeta_cost' => 'float',
|
||||||
'fuel_mogas_cost' => 'float',
|
'fuel_mogas_cost' => 'float',
|
||||||
@@ -45,12 +47,13 @@ class Airport extends BaseModel
|
|||||||
* Validation rules
|
* Validation rules
|
||||||
*/
|
*/
|
||||||
public static $rules = [
|
public static $rules = [
|
||||||
'icao' => 'required',
|
'icao' => 'required',
|
||||||
'iata' => 'nullable',
|
'iata' => 'nullable',
|
||||||
'name' => 'required',
|
'name' => 'required',
|
||||||
'location' => 'nullable',
|
'location' => 'nullable',
|
||||||
'lat' => 'required|numeric',
|
'lat' => 'required|numeric',
|
||||||
'lon' => 'required|numeric',
|
'lon' => 'required|numeric',
|
||||||
|
'ground_handling_cost' => 'nullable|numeric',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,20 +12,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
{!! Form::label('iata', 'IATA:') !!}
|
||||||
|
{!! Form::text('iata', null, ['class' => 'form-control']) !!}
|
||||||
|
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
|
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
|
||||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group col-sm-4">
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
{!! Form::label('lat', 'Latitude:') !!} <span class="required">*</span>
|
{!! Form::label('lat', 'Latitude:') !!} <span class="required">*</span>
|
||||||
{!! Form::number('lat', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lat']) !!}
|
{!! Form::number('lat', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lat']) !!}
|
||||||
<p class="text-danger">{{ $errors->first('lat') }}</p>
|
<p class="text-danger">{{ $errors->first('lat') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-4">
|
||||||
{!! Form::label('lon', 'Longitude:') !!} <span class="required">*</span>
|
{!! Form::label('lon', 'Longitude:') !!} <span class="required">*</span>
|
||||||
{!! Form::number('lon', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lon']) !!}
|
{!! Form::number('lon', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lon']) !!}
|
||||||
<p class="text-danger">{{ $errors->first('lon') }}</p>
|
<p class="text-danger">{{ $errors->first('lon') }}</p>
|
||||||
@@ -33,33 +39,45 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
{!! Form::label('iata', 'IATA:') !!}
|
|
||||||
{!! Form::text('iata', null, ['class' => 'form-control']) !!}
|
|
||||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-4">
|
||||||
{!! Form::label('location', 'Location:') !!}
|
|
||||||
{!! Form::text('location', null, ['class' => 'form-control']) !!}
|
|
||||||
<p class="text-danger">{{ $errors->first('location') }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
{!! Form::label('country', 'Country:') !!}
|
{!! Form::label('country', 'Country:') !!}
|
||||||
{!! Form::text('country', null, ['class' => 'form-control']) !!}
|
{!! Form::text('country', null, ['class' => 'form-control']) !!}
|
||||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-4">
|
||||||
|
{!! Form::label('location', 'Location:') !!}
|
||||||
|
{!! Form::text('location', null, ['class' => 'form-control']) !!}
|
||||||
|
<p class="text-danger">{{ $errors->first('location') }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
{!! Form::label('timezone', 'Timezone:') !!}
|
{!! Form::label('timezone', 'Timezone:') !!}
|
||||||
{!! Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']); !!}
|
{!! Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']); !!}
|
||||||
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
{!! Form::label('ground_handling_cost', 'Ground Handling Cost:') !!}
|
||||||
|
|
||||||
|
@component('admin.components.info')
|
||||||
|
This is the base rate per-flight. A multiplier for this rate can be
|
||||||
|
set in the subfleet, so you can modulate those costs from there.
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
{!! Form::number('ground_handling_cost', null, ['class' => 'form-control']) !!}
|
||||||
|
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
{!! Form::label('hub', 'Hub:') !!}
|
{!! Form::label('hub', 'Hub:') !!}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
<th>Hub</th>
|
<th>Hub</th>
|
||||||
|
<th style="text-align: center;">GH Cost</th>
|
||||||
<th style="text-align: center;">100LL</th>
|
<th style="text-align: center;">100LL</th>
|
||||||
<th style="text-align: center;">JetA</th>
|
<th style="text-align: center;">JetA</th>
|
||||||
<th style="text-align: center;">MOGAS</th>
|
<th style="text-align: center;">MOGAS</th>
|
||||||
@@ -21,6 +22,9 @@
|
|||||||
<span class="label label-success">Hub</span>
|
<span class="label label-success">Hub</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
{!! $airport->ground_handling_cost !!}
|
||||||
|
</td>
|
||||||
<td style="text-align: center;">
|
<td style="text-align: center;">
|
||||||
<a class="inline" href="#" data-pk="{!! $airport->id !!}" data-name="fuel_100ll_cost">{!! $airport->fuel_100ll_cost !!}</a>
|
<a class="inline" href="#" data-pk="{!! $airport->id !!}" data-name="fuel_100ll_cost">{!! $airport->fuel_100ll_cost !!}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user