Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const tripPatternsFromVia: ViaTripsWithDetailsQuery['viaTrip']['tripPatte
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [],
Expand Down Expand Up @@ -182,6 +183,7 @@ export const tripPatternsFromVia: ViaTripsWithDetailsQuery['viaTrip']['tripPatte
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [],
Expand Down Expand Up @@ -315,6 +317,7 @@ export const tripPatternsViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPattern
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [],
Expand Down Expand Up @@ -408,6 +411,7 @@ export const tripPatternsViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPattern
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [
Expand Down Expand Up @@ -497,6 +501,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [],
Expand Down Expand Up @@ -619,6 +624,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [],
Expand Down Expand Up @@ -712,6 +718,7 @@ export const tripPatternsFromViaTo: ViaTripsWithDetailsQuery['viaTrip']['tripPat
},
fromEstimatedCall: {
cancellation: false,
requestStop: false,
notices: [],
},
situations: [
Expand Down
27 changes: 27 additions & 0 deletions src/page-modules/assistant/details/trip-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ export default function TripSection({
</TripRow>
)}

{leg.fromEstimatedCall?.requestStop && (
<TripRow>
<MessageBox
type="info"
message={t(
PageText.Assistant.details.tripSection.requestStopBoarding,
)}
statusIcon={<ColorIcon icon="status/Info" />}
/>
</TripRow>
)}

{isWalkSection ? (
<WalkSection
walkDuration={leg.duration}
Expand Down Expand Up @@ -262,6 +274,21 @@ export default function TripSection({
</TripRow>
)}
</div>

{leg.toEstimatedCall?.requestStop && (
<div className={style.toEstimatedCallInfo}>
<TripRow>
<MessageBox
type="info"
message={t(
PageText.Assistant.details.tripSection.requestStopAlighting,
)}
statusIcon={<ColorIcon icon="status/Info" />}
/>
</TripRow>
</div>
)}

{showInterchangeSection && (
<InterchangeSection
interchangeDetails={interchangeDetails}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
display: flex;
flex-direction: column;
gap: token('spacing.medium');
}
.rowContainer {
position: relative;
overflow: hidden;
gap: 1rem;
--labelWidth: 2.625rem;
--decorationContainerWidth: 2rem;
--decorationLineWidth: 0.25rem;
--decorationLineEndWidth: 0.75rem;
--decorationLineInset: 1rem;
}
.rowContainer {
position: relative;
overflow: hidden;
gap: 1rem;
}
.toEstimatedCallInfo {
margin-top: calc(-1 * token('spacing.medium'));
}
.walkTime,
.waitTime,
.textColor__secondary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ fragment legWithDetails on Leg {
frontText
}
cancellation
requestStop
}
toEstimatedCall {
notices {
Expand All @@ -123,6 +124,7 @@ fragment legWithDetails on Leg {
frontText
}
cancellation
requestStop
}
interchangeTo {
guaranteed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ query ViaTripsWithDetails(
frontText
}
cancellation
requestStop
}
toEstimatedCall {
notices {
Expand All @@ -95,6 +96,7 @@ query ViaTripsWithDetails(
frontText
}
cancellation
requestStop
}
interchangeTo {
guaranteed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ describe('trip pattern', function () {
fromEstimatedCall: {
notices: [],
cancellation: true,
requestStop: false,
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const tripPatternFixture: ExtendedTripPatternType = {
fromEstimatedCall: {
notices: [],
cancellation: false,
requestStop: false,
},
situations: [],
fromPlace: {
Expand Down Expand Up @@ -97,6 +98,7 @@ export const tripPatternWithDetailsFixture: ExtendedTripPatternWithDetailsType =
fromEstimatedCall: {
notices: [],
cancellation: false,
requestStop: false,
},
situations: [],
fromPlace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ function getLegNotificationType(
const bookingMsgType = leg.bookingArrangements
? ('warning' as const)
: undefined;
const requestStopMsgType =
leg.fromEstimatedCall?.requestStop || leg.toEstimatedCall?.requestStop
? 'info'
: undefined;
const shortTransferMsgType: Statuses | undefined = (() => {
if (!previousLeg) return undefined;
const waitSeconds = secondsBetween(
Expand All @@ -123,6 +127,7 @@ function getLegNotificationType(
situationsMsgType,
railReplacementMsgType,
bookingMsgType,
requestStopMsgType,
shortTransferMsgType,
]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const tripPatternFixture: ExtendedTripPatternType = {
fromEstimatedCall: {
notices: [],
cancellation: false,
requestStop: false,
},
situations: [],
fromPlace: {
Expand Down
10 changes: 10 additions & 0 deletions src/translations/pages/assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading