Add more airlines and fix edit bugs
This commit is contained in:
@@ -137,12 +137,12 @@ class FlightController extends Controller
|
||||
'flight_class' => $flight->flightClass->toArray(),
|
||||
'flight_reason' => $flight->flightReason->toArray(),
|
||||
'airline_options' => $flight->airline
|
||||
? [['value' => $flight->airline->id, 'title' => $flight->airline->name]]
|
||||
? [['value' => $flight->airline->id, 'title' => $flight->airline->displayName()]]
|
||||
: [],
|
||||
'from_options' => [['value' => $flight->departureAirport->id, 'title' => $flight->departureAirport->name, 'country_code' => strtolower($flight->departureAirport->region->country->code)]],
|
||||
'to_options' => [['value' => $flight->arrivalAirport->id, 'title' => $flight->arrivalAirport->name, 'country_code' => strtolower($flight->arrivalAirport->region->country->code)]],
|
||||
'from_options' => [['value' => $flight->departureAirport->id, 'title' => $flight->departureAirport->displayName(), 'country_code' => strtolower($flight->departureAirport->region->country->code)]],
|
||||
'to_options' => [['value' => $flight->arrivalAirport->id, 'title' => $flight->arrivalAirport->displayName(), 'country_code' => strtolower($flight->arrivalAirport->region->country->code)]],
|
||||
'aircraft_options' => $flight->aircraft
|
||||
? [['value' => $flight->aircraft->id, 'title' => $flight->aircraft->name]]
|
||||
? [['value' => $flight->aircraft->id, 'title' => $flight->aircraft->displayName()]]
|
||||
: [],
|
||||
];
|
||||
return Inertia::render('AddFlight', [
|
||||
|
||||
Reference in New Issue
Block a user