User can add/edit flights
This commit is contained in:
+5
-8
@@ -37,13 +37,10 @@ Route::domain(config('app.domain'))->group(
|
||||
return Inertia::render('Fr24Import');
|
||||
})->name('import.fr24');
|
||||
|
||||
Route::get('/add-flight', function () {
|
||||
return Inertia::render('AddFlight', [
|
||||
'seat_types' => SeatType::all()->map(fn ($s) => ['value' => $s->id, 'title' => $s->name]),
|
||||
'flight_reasons' => FlightReason::all()->map(fn ($f) => ['value' => $f->id, 'title' => $f->name]),
|
||||
'flight_classes' => FlightClass::all()->map(fn ($f) => ['value' => $f->id, 'title' => $f->name]),
|
||||
]);
|
||||
});
|
||||
Route::post('/flights', [FlightController::class, 'store'])->name('flights.store');
|
||||
Route::get('/flights/add', [FlightController::class, 'add'])->name('flights.add');
|
||||
Route::get('/flights/{flight}/edit', [FlightController::class, 'edit'])->name('flights.edit');
|
||||
Route::put('/flights/{flight}', [FlightController::class, 'update'])->name('flights.update');
|
||||
|
||||
Route::get('/reconcile', function () {
|
||||
$flight = new FlightImportController()->reconcile(request());
|
||||
@@ -74,7 +71,7 @@ Route::domain(config('app.domain'))->group(
|
||||
Route::get('/search/airports', [SearchController::class, 'airports'])->name('search.airports');
|
||||
|
||||
|
||||
Route::get('/u/{username}', [FlightProfileController::class, 'view']);
|
||||
Route::get('/u/{username}', [FlightProfileController::class, 'view'])->name('profile.view');
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user