Added Charts

This commit is contained in:
2026-04-11 23:00:35 +10:00
parent 95624f345c
commit f335951784
4 changed files with 508 additions and 84 deletions
+13 -1
View File
@@ -1,11 +1,15 @@
<?php
use App\Http\Controllers\FlightController;
use App\Http\Controllers\FlightImportController;
use App\Http\Controllers\FlightProfileController;
use App\Http\Controllers\LogoController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\SearchController;
use App\Models\Airline;
use App\Models\FlightClass;
use App\Models\FlightReason;
use App\Models\SeatType;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
@@ -33,6 +37,14 @@ 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::get('/reconcile', function () {
$flight = new FlightImportController()->reconcile(request());
@@ -46,7 +58,7 @@ Route::domain(config('app.domain'))->group(
]);
})->name('reconcile');
Route::get('/flights/lookup', [FlightController::class, 'lookup'])->name('flights.lookup');
Route::post('/flights/import', [FlightImportController::class, 'store'])->name('flights.import.store');
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');