diff --git a/database/seeders/Constants/PermissionSeeder.php b/database/seeders/Constants/PermissionSeeder.php index ab2076f9e..12fd0aa0b 100644 --- a/database/seeders/Constants/PermissionSeeder.php +++ b/database/seeders/Constants/PermissionSeeder.php @@ -56,7 +56,10 @@ public function run(): void { $roleEventModerator->givePermissionTo($permissionDenyEvents); $roleEventModerator->givePermissionTo($permissionUpdateEvents); + //Revoke permissions from closed-beta role + $roleClosedBeta->revokePermissionTo($permissionCreateManualTrip); //now in open-beta + //Assign permissions to open-beta role - $roleClosedBeta->givePermissionTo($permissionCreateManualTrip); + $roleOpenBeta->givePermissionTo($permissionCreateManualTrip); } } diff --git a/lang/de.json b/lang/de.json index dc1c26443..2f23a2a74 100644 --- a/lang/de.json +++ b/lang/de.json @@ -763,5 +763,7 @@ "error.419": "Zeitüberschreitung", "error.429": "Zu viele Anfragen", "error.500": "Interner Serverfehler", - "support.rate_limit_exceeded": "Du hast vor kurzem bereits eine Support-Anfrage erstellt. Bitte warte noch etwas, bevor du eine weitere Anfrage erstellst." + "support.rate_limit_exceeded": "Du hast vor kurzem bereits eine Support-Anfrage erstellt. Bitte warte noch etwas, bevor du eine weitere Anfrage erstellst.", + "missing-journey": "Ist deine Fahrt nicht dabei?", + "create-journey": "Fahrt erstellen" } diff --git a/lang/en.json b/lang/en.json index 7a090dba0..e0ccf4dca 100644 --- a/lang/en.json +++ b/lang/en.json @@ -763,5 +763,7 @@ "error.419": "Page expired", "error.429": "Too many requests", "error.500": "Server error", - "support.rate_limit_exceeded": "You have recently created a support request. Please wait a bit before creating another request." + "support.rate_limit_exceeded": "You have recently created a support request. Please wait a bit before creating another request.", + "missing-journey": "Haven't found your Journey?", + "create-journey": "Create journey" } diff --git a/resources/views/admin/layout.blade.php b/resources/views/admin/layout.blade.php index 20046d61a..7d29debe4 100644 --- a/resources/views/admin/layout.blade.php +++ b/resources/views/admin/layout.blade.php @@ -58,10 +58,6 @@ class="brand-image me-3" style="width: 30px; opacity: 0.8"> Checkin - - - Trips - Stations diff --git a/resources/views/admin/trip/create.blade.php b/resources/views/admin/trip/create.blade.php deleted file mode 100644 index a54a7492c..000000000 --- a/resources/views/admin/trip/create.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -@extends('admin.layout') - -@section('title', 'Create new trip manually') - -@section('content') -
- -
-@endsection diff --git a/resources/views/beta/trip-creation.blade.php b/resources/views/beta/trip-creation.blade.php new file mode 100644 index 000000000..c4363070d --- /dev/null +++ b/resources/views/beta/trip-creation.blade.php @@ -0,0 +1,18 @@ +@extends('layouts.app') + +@section('title', 'Create trip manually') + +@section('content') +
+
+ @if(app()->getLocale() !== 'en') + + @endif + + +
+
+@endsection diff --git a/resources/views/closed-beta/trip-creation.blade.php b/resources/views/closed-beta/trip-creation.blade.php deleted file mode 100644 index 08fe81ac8..000000000 --- a/resources/views/closed-beta/trip-creation.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -@extends('layouts.app') - -@section('title', 'Create trip manually') - -@section('content') -
-
- -
-
-@endsection diff --git a/resources/views/stationboard.blade.php b/resources/views/stationboard.blade.php index cac6ba1e5..b0e88dbf9 100644 --- a/resources/views/stationboard.blade.php +++ b/resources/views/stationboard.blade.php @@ -10,8 +10,20 @@ + +
+
+

+ Beta + {{__('missing-journey')}} +

+
+ + {{__('create-journey')}} + +
@else @include('includes.station-autocomplete')
diff --git a/resources/views/stats/stats.blade.php b/resources/views/stats/stats.blade.php index e387c7b3c..48fbae446 100644 --- a/resources/views/stats/stats.blade.php +++ b/resources/views/stats/stats.blade.php @@ -35,23 +35,25 @@
@include('stats.includes.global_cards') -

- {{__('experimental-features')}} -

- + @endif
diff --git a/resources/vue/components/TripCreation/TripCreationForm.vue b/resources/vue/components/TripCreation/TripCreationForm.vue index 725293ad9..669197e38 100644 --- a/resources/vue/components/TripCreation/TripCreationForm.vue +++ b/resources/vue/components/TripCreation/TripCreationForm.vue @@ -97,7 +97,7 @@ export default { window.location.href = `/trains/trip/?${new URLSearchParams(query).toString()}`; }); } - if(data.status === 422) { + if (data.status === 422) { data.json().then((result) => { alert(result.message); }); @@ -121,20 +121,24 @@ export default {

- Create trip manually (closed-beta) + Create trip manually

- Beta users only + Beta

- This form is currently for testing purposes only. - Beta users can create a trip with manually entered data. - All Users can check in to this trip. - It should be tested if the trip is created correctly and all data required for the trip is present, so no - (500) errors occur or if features are missing which are not mentioned in the limitations section. + Please note, that the creation of trips is currently in beta. + You can create trips manually by entering the stations and times. + There are some limitations, which are listed below. +
+ If you encounter any issues, please report them to us. + + Report issue + +
@@ -166,7 +170,8 @@ export default {
- +
diff --git a/routes/web.php b/routes/web.php index ab7e46fd0..83cd26558 100644 --- a/routes/web.php +++ b/routes/web.php @@ -123,9 +123,11 @@ * All of these routes can only be used by fully registered users. */ Route::middleware(['auth', 'privacy'])->group(function() { - Route::view('/beta/trip-creation', 'closed-beta.trip-creation') - ->can('create-manual-trip') - ->name('beta.trip-creation'); + + Route::redirect('/beta/trip-creation', '/trip/create'); //TODO: remove after 2024-06 + Route::view('/trip/create', 'beta.trip-creation') + ->middleware(['can:create-manual-trip']) + ->name('trip.create'); Route::post('/ics/createToken', [IcsController::class, 'createIcsToken']) ->name('ics.createToken'); //TODO: Replace with API Endpoint diff --git a/routes/web/admin.php b/routes/web/admin.php index 7ac6d1345..161f81c93 100644 --- a/routes/web/admin.php +++ b/routes/web/admin.php @@ -43,9 +43,6 @@ }); Route::prefix('trip')->group(function() { - Route::view('/create', 'admin.trip.create') - ->name('admin.trip.create'); - Route::get('/{id}', [TripController::class, 'renderTrip']) ->name('admin.trip.show'); });