From 968272754e880dcc3f0c578b1802dc178849cf3c Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 6 Apr 2026 10:39:03 +1000 Subject: [PATCH] Save user flights --- .../Controllers/FlightImportController.php | 6 ++--- resources/css/app.css | 10 +------ .../js/Components/FlightsGoneBy/AppLink.vue | 1 + resources/js/Pages/Dashboard.vue | 10 +++---- resources/js/Pages/ReconcileFlight.vue | 27 ++++++++++--------- routes/web.php | 2 +- 6 files changed, 26 insertions(+), 30 deletions(-) diff --git a/app/Http/Controllers/FlightImportController.php b/app/Http/Controllers/FlightImportController.php index 9ddd46a..ca3d5a1 100644 --- a/app/Http/Controllers/FlightImportController.php +++ b/app/Http/Controllers/FlightImportController.php @@ -183,9 +183,9 @@ class FlightImportController extends Controller 'aircraft_id' => 'nullable|integer|exists:aircraft,id', 'registration' => 'nullable|string', 'seat_number' => 'nullable|string', - 'seat_type_id' => 'nullable|integer|exists:seat_types,id', - 'flight_class_id' => 'nullable|integer|exists:flight_classes,id', - 'flight_reason_id' => 'nullable|integer|exists:flight_reasons,id', + 'seat_type_id' => 'required|integer|exists:seat_types,id', + 'flight_class_id' => 'required|integer|exists:flight_classes,id', + 'flight_reason_id' => 'required|integer|exists:flight_reasons,id', 'note' => 'nullable|string', ], [ 'imported_flight_id.required' => 'The flight you are trying to reconcile needs to be reimported or refreshed.', diff --git a/resources/css/app.css b/resources/css/app.css index 7fa94f6..4a9218b 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -14,19 +14,11 @@ } a { - color: var(--accent); + cursor: pointer; text-decoration: none; } -a:visited { - color: var(--accent); -} -a:hover { - text-decoration: underline; - text-decoration-color: rgba(56, 189, 248, 0.4); - text-underline-offset: 3px; -} .glass { background: rgba(17, 24, 39, 0.2); /* --surface at 60% */ diff --git a/resources/js/Components/FlightsGoneBy/AppLink.vue b/resources/js/Components/FlightsGoneBy/AppLink.vue index 380092e..d96c74b 100644 --- a/resources/js/Components/FlightsGoneBy/AppLink.vue +++ b/resources/js/Components/FlightsGoneBy/AppLink.vue @@ -30,4 +30,5 @@ defineProps<{ text-decoration: underline; text-decoration-color: rgba(56, 189, 248, 0.4); } + diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue index 2746a66..178846d 100644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -19,27 +19,27 @@ const name = computed(() => page?.props?.auth?.user?.name || 'there'); - + Add a Flight - + Edit Flights - + Import from FR24 - + View Profile - + Log Out diff --git a/resources/js/Pages/ReconcileFlight.vue b/resources/js/Pages/ReconcileFlight.vue index 5e3779b..cee16fb 100644 --- a/resources/js/Pages/ReconcileFlight.vue +++ b/resources/js/Pages/ReconcileFlight.vue @@ -155,15 +155,16 @@ function submit() { - + - - + + + - - + + + + - - + + + + + - - - - - + + diff --git a/routes/web.php b/routes/web.php index 284ee1d..97a2734 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,7 +15,7 @@ use Inertia\Inertia; Route::domain(config('app.domain'))->group( function() { Route::get('/', function () { - return Inertia::render('Index'); + return Inertia::render(auth()->check() ? 'Dashboard' : 'Auth/Login'); });