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