Fix flight type parameter
This commit is contained in:
parent
7decac105f
commit
73ffc9cf44
@ -209,6 +209,11 @@ class PirepController extends Controller
|
|||||||
$this->checkCancelled($pirep);
|
$this->checkCancelled($pirep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default to a scheduled passenger flight
|
||||||
|
if(!array_key_exists('flight_type', $attrs)) {
|
||||||
|
$attrs['flight_type'] = 'J';
|
||||||
|
}
|
||||||
|
|
||||||
$pirep->save();
|
$pirep->save();
|
||||||
|
|
||||||
Log::info('PIREP PREFILED');
|
Log::info('PIREP PREFILED');
|
||||||
|
@ -30,6 +30,7 @@ class FileRequest extends FormRequest
|
|||||||
'airline_id' => 'nullable|exists:airlines,id',
|
'airline_id' => 'nullable|exists:airlines,id',
|
||||||
'aircraft_id' => 'nullable|exists:aircraft,id',
|
'aircraft_id' => 'nullable|exists:aircraft,id',
|
||||||
'flight_number' => 'nullable',
|
'flight_number' => 'nullable',
|
||||||
|
'flight_type' => 'nullable',
|
||||||
'dpt_airport_id' => 'nullable',
|
'dpt_airport_id' => 'nullable',
|
||||||
'arr_airport_id' => 'nullable',
|
'arr_airport_id' => 'nullable',
|
||||||
'route_code' => 'nullable',
|
'route_code' => 'nullable',
|
||||||
@ -44,7 +45,6 @@ class FileRequest extends FormRequest
|
|||||||
'source_name' => 'nullable',
|
'source_name' => 'nullable',
|
||||||
'score' => 'nullable|integer',
|
'score' => 'nullable|integer',
|
||||||
'landing_rate' => 'nullable|numeric',
|
'landing_rate' => 'nullable|numeric',
|
||||||
'flight_type' => 'nullable|integer',
|
|
||||||
'block_off_time' => 'nullable|date',
|
'block_off_time' => 'nullable|date',
|
||||||
'block_on_time' => 'nullable|date',
|
'block_on_time' => 'nullable|date',
|
||||||
'created_at' => 'nullable|date',
|
'created_at' => 'nullable|date',
|
||||||
|
@ -26,6 +26,7 @@ class PrefileRequest extends FormRequest
|
|||||||
'source_name' => 'required',
|
'source_name' => 'required',
|
||||||
|
|
||||||
'level' => 'nullable|numeric',
|
'level' => 'nullable|numeric',
|
||||||
|
'flight_type' => 'nullable',
|
||||||
'route_code' => 'nullable',
|
'route_code' => 'nullable',
|
||||||
'route_leg' => 'nullable',
|
'route_leg' => 'nullable',
|
||||||
'distance' => 'nullable|numeric',
|
'distance' => 'nullable|numeric',
|
||||||
@ -38,7 +39,6 @@ class PrefileRequest extends FormRequest
|
|||||||
'route' => 'nullable',
|
'route' => 'nullable',
|
||||||
'notes' => 'nullable',
|
'notes' => 'nullable',
|
||||||
'score' => 'nullable|integer',
|
'score' => 'nullable|integer',
|
||||||
'flight_type' => 'nullable|integer',
|
|
||||||
'block_off_time' => 'nullable|date',
|
'block_off_time' => 'nullable|date',
|
||||||
'block_on_time' => 'nullable|date',
|
'block_on_time' => 'nullable|date',
|
||||||
'created_at' => 'nullable|date',
|
'created_at' => 'nullable|date',
|
||||||
|
@ -33,6 +33,7 @@ class UpdateRequest extends FormRequest
|
|||||||
'planned_distance' => 'nullable|numeric',
|
'planned_distance' => 'nullable|numeric',
|
||||||
'block_time' => 'nullable|integer',
|
'block_time' => 'nullable|integer',
|
||||||
'flight_time' => 'nullable|integer',
|
'flight_time' => 'nullable|integer',
|
||||||
|
'flight_type' => 'nullable',
|
||||||
'planned_flight_time' => 'nullable|integer',
|
'planned_flight_time' => 'nullable|integer',
|
||||||
'level' => 'nullable|numeric',
|
'level' => 'nullable|numeric',
|
||||||
'zfw' => 'nullable|numeric',
|
'zfw' => 'nullable|numeric',
|
||||||
@ -42,7 +43,6 @@ class UpdateRequest extends FormRequest
|
|||||||
'notes' => 'nullable',
|
'notes' => 'nullable',
|
||||||
'source_name' => 'nullable|max:25',
|
'source_name' => 'nullable|max:25',
|
||||||
'landing_rate' => 'nullable|numeric',
|
'landing_rate' => 'nullable|numeric',
|
||||||
'flight_type' => 'nullable|integer',
|
|
||||||
'block_off_time' => 'nullable|date',
|
'block_off_time' => 'nullable|date',
|
||||||
'block_on_time' => 'nullable|date',
|
'block_on_time' => 'nullable|date',
|
||||||
'created_at' => 'nullable|date',
|
'created_at' => 'nullable|date',
|
||||||
|
Loading…
Reference in New Issue
Block a user