From f53ba238a92dcfb3b18315826d8e33f5e9fb07c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B8ran=20Dalum?= Date: Mon, 31 Aug 2026 13:02:23 +0200 Subject: [PATCH] feat: Add requestStop to travel search --- .../__tests__/assistant-data.fixture.ts | 7 +++++ .../assistant/details/trip-section/index.tsx | 27 +++++++++++++++++++ .../trip-section/trip-section.module.css | 13 +++++---- .../journey-gql/trip-with-details.gql | 2 ++ .../journey-gql/via-trip-with-details.gql | 2 ++ .../__tests__/travel-card.test.tsx | 1 + .../__tests__/trip-pattern.fixture.ts | 2 ++ .../travel-card/travel-card-legs/index.tsx | 5 ++++ .../__tests__/trip-pattern.fixture.ts | 1 + src/translations/pages/assistant.ts | 10 +++++++ 10 files changed, 65 insertions(+), 5 deletions(-) diff --git a/src/page-modules/assistant/__tests__/assistant-data.fixture.ts b/src/page-modules/assistant/__tests__/assistant-data.fixture.ts index 2ee4c549e..e5d906b6a 100644 --- a/src/page-modules/assistant/__tests__/assistant-data.fixture.ts +++ b/src/page-modules/assistant/__tests__/assistant-data.fixture.ts @@ -82,6 +82,7 @@ export const tripPatternsFromVia: ViaTripsWithDetailsQuery['viaTrip']['tripPatte }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [], @@ -182,6 +183,7 @@ export const tripPatternsFromVia: ViaTripsWithDetailsQuery['viaTrip']['tripPatte }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [], @@ -315,6 +317,7 @@ export const tripPatternsViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPattern }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [], @@ -408,6 +411,7 @@ export const tripPatternsViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPattern }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [ @@ -497,6 +501,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [], @@ -619,6 +624,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [], @@ -712,6 +718,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat }, fromEstimatedCall: { cancellation: false, + requestStop: false, notices: [], }, situations: [ diff --git a/src/page-modules/assistant/details/trip-section/index.tsx b/src/page-modules/assistant/details/trip-section/index.tsx index d7fb0510d..4d62b8140 100644 --- a/src/page-modules/assistant/details/trip-section/index.tsx +++ b/src/page-modules/assistant/details/trip-section/index.tsx @@ -132,6 +132,18 @@ export default function TripSection({ )} + {leg.fromEstimatedCall?.requestStop && ( + + } + /> + + )} + {isWalkSection ? ( )} + + {leg.toEstimatedCall?.requestStop && ( +
+ + } + /> + +
+ )} + {showInterchangeSection && ( { if (!previousLeg) return undefined; const waitSeconds = secondsBetween( @@ -123,6 +127,7 @@ function getLegNotificationType( situationsMsgType, railReplacementMsgType, bookingMsgType, + requestStopMsgType, shortTransferMsgType, ]); } diff --git a/src/page-modules/assistant/trip/trip-pattern-collapse/__tests__/trip-pattern.fixture.ts b/src/page-modules/assistant/trip/trip-pattern-collapse/__tests__/trip-pattern.fixture.ts index 81e33c0bc..26139cd58 100644 --- a/src/page-modules/assistant/trip/trip-pattern-collapse/__tests__/trip-pattern.fixture.ts +++ b/src/page-modules/assistant/trip/trip-pattern-collapse/__tests__/trip-pattern.fixture.ts @@ -23,6 +23,7 @@ export const tripPatternFixture: ExtendedTripPatternType = { fromEstimatedCall: { notices: [], cancellation: false, + requestStop: false, }, situations: [], fromPlace: { diff --git a/src/translations/pages/assistant.ts b/src/translations/pages/assistant.ts index 80bd61ca2..e9d27b938 100644 --- a/src/translations/pages/assistant.ts +++ b/src/translations/pages/assistant.ts @@ -503,6 +503,16 @@ const AssistantInternal = { 'Rail replacement bus', 'Buss for tog', ), + requestStopBoarding: _( + 'Stopper kun ved behov. Stå synlig og rekk ut hånden så føreren ser deg.', + 'Stops on request only. Stand visibly and raise your hand so the driver can see you.', + 'Stoppar berre ved behov. Stå synleg og rekk ut handa så føraren ser deg.', + ), + requestStopAlighting: _( + 'Stopper kun ved behov. Si ifra til føreren eller konduktøren på forhånd.', + 'Stops on request only. Let the driver or conductor know in advance.', + 'Stoppar berre ved behov. Sei ifrå til føraren eller konduktøren på førehand.', + ), interchange: ( fromPublicCode: string, toPublicCode: string,