Search Flights By Flight Type (#987)
Flight Controller : Added flight_type to return Flight Repository : Made flight_type searchable and added its where criteria Flight.Search.Blade : Added the flight types in a reasonable order as a dropdown (like schedule pax,charter pax,cargo,others) Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
This commit is contained in:
parent
29ff0758a7
commit
a5b83185f5
@ -120,6 +120,7 @@ class FlightController extends Controller
|
|||||||
'saved' => $saved_flights,
|
'saved' => $saved_flights,
|
||||||
'subfleets' => $this->subfleetRepo->selectBoxList(true),
|
'subfleets' => $this->subfleetRepo->selectBoxList(true),
|
||||||
'flight_number' => $request->input('flight_number'),
|
'flight_number' => $request->input('flight_number'),
|
||||||
|
'flight_type' => $request->input('flight_type'),
|
||||||
'arr_icao' => $request->input('arr_icao'),
|
'arr_icao' => $request->input('arr_icao'),
|
||||||
'dep_icao' => $request->input('dep_icao'),
|
'dep_icao' => $request->input('dep_icao'),
|
||||||
'subfleet_id' => $request->input('subfleet_id'),
|
'subfleet_id' => $request->input('subfleet_id'),
|
||||||
|
@ -20,6 +20,7 @@ class FlightRepository extends Repository implements CacheableInterface
|
|||||||
'arr_airport_id',
|
'arr_airport_id',
|
||||||
'distance',
|
'distance',
|
||||||
'dpt_airport_id',
|
'dpt_airport_id',
|
||||||
|
'flight_type',
|
||||||
'flight_number' => 'like',
|
'flight_number' => 'like',
|
||||||
'route_code' => 'like',
|
'route_code' => 'like',
|
||||||
'route_leg' => 'like',
|
'route_leg' => 'like',
|
||||||
@ -93,6 +94,10 @@ class FlightRepository extends Repository implements CacheableInterface
|
|||||||
$where['flight_number'] = $request->input('flight_number');
|
$where['flight_number'] = $request->input('flight_number');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->filled('flight_type')) {
|
||||||
|
$where['flight_type'] = $request->input('flight_type');
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->filled('route_code')) {
|
if ($request->filled('route_code')) {
|
||||||
$where['route_code'] = $request->input('route_code');
|
$where['route_code'] = $request->input('route_code');
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,29 @@
|
|||||||
<p>@lang('common.airline')</p>
|
<p>@lang('common.airline')</p>
|
||||||
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>@lang('flights.flighttype')</label>
|
||||||
|
<select id="flight_type" name="flight_type" class="custom-select select2">
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="J">@lang('flights.type.pass_scheduled')</option>
|
||||||
|
<option value="G">@lang('flights.type.pass_addtl')</option>
|
||||||
|
<option value="C">@lang('flights.type.charter_pass_only')</option>
|
||||||
|
<option value="O">@lang('flights.type.charter_special')</option>
|
||||||
|
<option value="E">@lang('flights.type.special_vip')</option>
|
||||||
|
<option value="F">@lang('flights.type.cargo_scheduled')</option>
|
||||||
|
<option value="A">@lang('flights.type.addtl_cargo_mail')</option>
|
||||||
|
<option value="H">@lang('flights.type.charter_cargo')</option>
|
||||||
|
<option value="M">@lang('flights.type.mail_service')</option>
|
||||||
|
<option value="I">@lang('flights.type.ambulance')</option>
|
||||||
|
<option value="K">@lang('flights.type.training_flight')</option>
|
||||||
|
<option value="P">@lang('flights.type.positioning')</option>
|
||||||
|
<option value="T">@lang('flights.type.technical_test')</option>
|
||||||
|
<option value="X">@lang('flights.type.technical_stop')</option>
|
||||||
|
<option value="W">@lang('flights.type.military')</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>@lang('flights.flightnumber')</p>
|
<p>@lang('flights.flightnumber')</p>
|
||||||
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user