Save user flights
This commit is contained in:
@@ -83,7 +83,7 @@ class FlightImportController extends Controller
|
||||
->get(['id', 'name', 'municipality', 'iata_code', 'icao_code', 'region_id'])
|
||||
->map(fn($a) => [
|
||||
'value' => $a->id,
|
||||
'title' => "{$a->name} ({$a->iata_code}/{$a->icao_code})",
|
||||
'title' => "{$a->municipality} / {$a->name} ({$a->iata_code}/{$a->icao_code})",
|
||||
'country_code' => strtolower($a?->region->country->code ?? ''),
|
||||
])
|
||||
->values()
|
||||
@@ -129,7 +129,7 @@ class FlightImportController extends Controller
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
$flightToReconcile = ImportedFlight::where('user_id', $user->id)->orderBy('id')->first();
|
||||
$flightToReconcile = ImportedFlight::where('user_id', $user->id)->orderBy('date', 'asc')->first();
|
||||
|
||||
if (!$flightToReconcile) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user