From a90d73b0b1ecfe4c4ba4924f71913785a896d086 Mon Sep 17 00:00:00 2001 From: Kris Date: Sat, 11 Jan 2025 15:18:21 +0100 Subject: [PATCH] :fire: remove beta disclaimer (#3132) --- app/Http/Controllers/API/v1/TripController.php | 13 +------------ lang/de.json | 3 --- lang/en.json | 3 --- lang/es.json | 3 --- lang/fr.json | 3 --- lang/nl.json | 3 --- resources/views/vuestationboard.blade.php | 6 +++--- .../TripCreation/TripCreationForm.vue | 17 +---------------- routes/web.php | 1 - 9 files changed, 5 insertions(+), 47 deletions(-) diff --git a/app/Http/Controllers/API/v1/TripController.php b/app/Http/Controllers/API/v1/TripController.php index 8f20c2978..80c33bc33 100644 --- a/app/Http/Controllers/API/v1/TripController.php +++ b/app/Http/Controllers/API/v1/TripController.php @@ -20,20 +20,9 @@ class TripController extends Controller { /** - * Undocumented beta endpoint - only specific users have access - * - * @param Request $request - * - * @return TripResource|Response - * - * @todo add docs - * @todo currently the stations need to be in the database. We need to add a fallback to HAFAS. - * -> later solve the problem for non-existing stations + * @todo add docs when endpoint is stable */ public function createTrip(Request $request): TripResource|JsonResponse { - if (!auth()->user()?->can('create-manual-trip')) { - return response()->json(['message' => 'This endpoint is currently only available for open-beta users (you can enable open beta in your settings).'], 403); - } if (auth()->user()?->can('disallow-manual-trips')) { return response()->json(['message' => 'You are not allowed to create manual trips'], 403); } diff --git a/lang/de.json b/lang/de.json index 0783c858d..a89b54d14 100644 --- a/lang/de.json +++ b/lang/de.json @@ -745,9 +745,6 @@ "create-journey": "Fahrt erstellen", "trip_creation.no-valid-times": "Die Zeiten der Stationen sind nicht in einer zeitlich korrekten Reihenfolge.", "trip_creation.title": "Reise manuell erstellen", - "trip_creation.beta": "Bitte beachte, dass sich die Erstellung von Fahrten derzeit im Beta-Stadium befindet. Du kannst Fahrten manuell erstellen, indem du die Stationen und Zeiten eingibst. Dabei gibt es einige Einschränkungen, die unten aufgeführt sind.", - "trip_creation.beta2": "Solltest du auf Probleme stoßen, melde diese bitte an uns.", - "trip_creation.report_issue": "Problem melden", "trip_creation.form.origin": "Abfahrtsbahnhof", "trip_creation.form.destination": "Zielbahnhof", "trip_creation.form.add_stopover": "Zwischenhalt hinzufügen", diff --git a/lang/en.json b/lang/en.json index a2522b203..52107ff54 100644 --- a/lang/en.json +++ b/lang/en.json @@ -747,9 +747,6 @@ "create-journey": "Create journey", "trip_creation.no-valid-times": "The times of the stations are not in the correct chronological order.", "trip_creation.title": "Create trip manually", - "trip_creation.beta": "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.", - "trip_creation.beta2": "If you encounter any issues, please report them to us.", - "trip_creation.report_issue": "Report issue", "trip_creation.form.origin": "Departure station", "trip_creation.form.destination": "Destination station", "trip_creation.form.add_stopover": "Add stopover", diff --git a/lang/es.json b/lang/es.json index f963f5d81..ebc3bd3a1 100644 --- a/lang/es.json +++ b/lang/es.json @@ -711,9 +711,6 @@ "export.format": "¿En qué formato quieres exportar?", "create-journey": "Crear viaje", "trip_creation.title": "Crear viaje manualmente", - "trip_creation.beta": "Ten en cuenta que la creación de viajes está actualmente en beta. Puedes crear viajes manualnente introduciendo las estaciones y horarios. Hay varias limitaciones, listadas abajo.", - "trip_creation.beta2": "Si encuentras algún problema, notificanoslo.", - "trip_creation.report_issue": "Notificar problema", "trip_creation.form.origin": "Estación de salida", "missing-journey": "¿No has encontrado tu viaje?", "trip_creation.limitations.6": "Solo los métodos de transporte seleccionables están permitidos (viajes en coche, bici, andando... no están permitidos y serán eliminados). Mira también:", diff --git a/lang/fr.json b/lang/fr.json index 426cf1c90..75b628043 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -735,11 +735,8 @@ "stationboard.events-propose": "Vous pouvez proposer un événement ici :", "trip_creation.limitations.3": "Le voyage est rendu public. Ainsi, si vous vous inscrivez à un voyage, toutes les personnes qui peuvent voir votre statut peuvent également s'inscrire à ce voyage.", "checkin.success.title": "Enregistrement réussi !", - "trip_creation.beta": "Veuillez noter que la création de trajets est actuellement en version bêta. Vous pouvez créer des trajets manuellement en saisissant les stations et les horaires. Il y a quelques limitations, qui sont énumérées ci-dessous.", "action.error": "Cette action n'a pas pu être exécutée. Veuillez réessayer plus tard.", "create-journey": "Créer un trajet", - "trip_creation.beta2": "Si vous rencontrez des problèmes, veuillez nous les signaler.", - "trip_creation.report_issue": "Rapporter un problème", "trip_creation.form.origin": "Station de départ", "trip_creation.title": "Créer un trajet manuellement", "toggle-navigation": "Changer la navigation", diff --git a/lang/nl.json b/lang/nl.json index 507e59ca5..b0d2d4215 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -741,9 +741,6 @@ "create-journey": "Reis toevoegen", "trip_creation.limitations.1": "Je kunt alleen stations toevoegen die beschikbaar zijn in DB Navigator", "trip_creation.limitations.2": "De routekaarten zijn overgenomen van de opgegeven stations", - "trip_creation.beta": "Let op: het toevoegen van reizen bevindt zich momenteel in de testfase. Je kunt eigen reizen toevoegen door stationsnamen en tijden in te vullen. Wel zijn er enkele beperkingen, die hieronder worden benoemd.", - "trip_creation.beta2": "Als je problemen ervaart, meld ze dan aan ons.", - "trip_creation.report_issue": "Probleem melden", "trip_creation.form.origin": "Vertrekstation", "trip_creation.form.destination": "Aankomststation", "trip_creation.form.add_stopover": "Overstap toevoegen", diff --git a/resources/views/vuestationboard.blade.php b/resources/views/vuestationboard.blade.php index 55b4b95c5..ac2949053 100644 --- a/resources/views/vuestationboard.blade.php +++ b/resources/views/vuestationboard.blade.php @@ -8,11 +8,11 @@
- @if(auth()->user()->hasRole('open-beta') && !auth()->user()->can('disallow-manual-trips')) + @cannot('disallow-manual-trips')

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

@@ -20,7 +20,7 @@ {{__('create-journey')}}
- @endif + @endcannot @if(isset($station) && auth()->user()?->hasRole('open-beta')) @include('includes.station-infos') diff --git a/resources/vue/components/TripCreation/TripCreationForm.vue b/resources/vue/components/TripCreation/TripCreationForm.vue index c43d0b84d..89a24be22 100644 --- a/resources/vue/components/TripCreation/TripCreationForm.vue +++ b/resources/vue/components/TripCreation/TripCreationForm.vue @@ -191,26 +191,11 @@ export default {