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 @@ -26,6 +26,7 @@ export const departureDataFixture: ExtendedDeparturesType = {
expectedDepartureTime: '2025-04-04T13:55:00+02:00',
realtime: false,
cancellation: false,
requestStop: false,
quay: {
id: 'NSR:Quay:71184',
},
Expand Down Expand Up @@ -55,6 +56,7 @@ export const departureDataFixture: ExtendedDeparturesType = {
expectedDepartureTime: '2025-04-04T13:57:00+02:00',
realtime: false,
cancellation: false,
requestStop: false,
quay: {
id: 'NSR:Quay:71184',
},
Expand Down Expand Up @@ -93,6 +95,7 @@ export const departureDataFixture: ExtendedDeparturesType = {
expectedDepartureTime: '2025-04-04T13:53:00+02:00',
realtime: false,
cancellation: false,
requestStop: false,
quay: {
id: 'NSR:Quay:71181',
},
Expand Down Expand Up @@ -122,6 +125,7 @@ export const departureDataFixture: ExtendedDeparturesType = {
expectedDepartureTime: '2025-04-04T13:54:00+02:00',
realtime: false,
cancellation: false,
requestStop: false,
quay: {
id: 'NSR:Quay:71181',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T14:59:24+01:00',
forAlighting: false,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -53,6 +54,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:01:22+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -82,6 +84,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:02:11+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -111,6 +114,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:03:04+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -140,6 +144,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:03:54+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -169,6 +174,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:04:42+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -198,6 +204,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:05:19+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -227,6 +234,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:06:34+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -256,6 +264,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:07:52+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down Expand Up @@ -285,6 +294,7 @@ export const serviceJourneyFixture: ServiceJourneyType = {
expectedArrivalTime: '2023-11-10T15:09:56+01:00',
forAlighting: true,
forBoarding: true,
requestStop: false,
realtime: true,
quay: {
publicCode: '',
Expand Down
13 changes: 13 additions & 0 deletions src/page-modules/departures/details/estimated-call-rows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ function EstimatedCallRow({
const { t } = useTranslation();
const { group, isStartOfGroup, isEndOfGroup } = call.metadata;
const isBetween = !isStartOfGroup && !isEndOfGroup;
const isStartOfTripGroup = group === 'trip' && isStartOfGroup;
const isEndOfTripGroup = group === 'trip' && isEndOfGroup;
const iconColor = useTransportationThemeColor({
transportMode: group === 'trip' ? mode : 'unknown',
transportSubmode: subMode,
Expand Down Expand Up @@ -187,6 +189,17 @@ function EstimatedCallRow({
{t(PageText.Departures.details.messages.noBoarding)}
</Typo.p>
)}
{call.requestStop && (
<Typo.p textType="body__s" className={style.boardingInfo}>
{t(
isStartOfTripGroup
? PageText.Departures.details.messages.requestStopBoarding
: isEndOfTripGroup
? PageText.Departures.details.messages.requestStopAlighting
: PageText.Departures.details.messages.requestStop,
)}
</Typo.p>
)}
</TripRow>
{situations.map((situation) => (
<TripRow key={situation.situationNumber}>
Expand Down
8 changes: 8 additions & 0 deletions src/page-modules/departures/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ export function DeparturesDetails({
/>
),
)}
{focusedCall.requestStop && (
<MessageBox
type="info"
message={t(
PageText.Departures.details.messages.requestStopBoarding,
)}
/>
)}
<EstimatedCallRows
calls={estimatedCallsWithMetadata}
mode={serviceJourney.transportMode ?? 'unknown'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fragment estimatedCall on EstimatedCall {
expectedDepartureTime
realtime
cancellation
requestStop
quay {
id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fragment serviceJourneyEstimatedCall on EstimatedCall {
expectedArrivalTime
forAlighting
forBoarding
requestStop
realtime
quay {
id
Expand Down
14 changes: 9 additions & 5 deletions src/page-modules/departures/stop-place/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import ScreenReaderOnly from '@atb/components/screen-reader-only';
import { Typo } from '@atb/components/typography';
import {
getMostCriticalStatus,
getMsgTypeForMostCriticalSituationOrNotice,
isSituationValidAtDate,
SituationMessageBox,
Expand Down Expand Up @@ -318,11 +319,14 @@ export function EstimatedCallItem({
}
label={departure.serviceJourney.line.publicCode}
transportSubmode={departure.serviceJourney.line.transportSubmode}
notificationType={getMsgTypeForMostCriticalSituationOrNotice(
departure.situations,
departure.notices,
departure.cancellation,
)}
notificationType={getMostCriticalStatus([
getMsgTypeForMostCriticalSituationOrNotice(
departure.situations,
departure.notices,
departure.cancellation,
),
departure.requestStop ? 'info' : undefined,
])}
/>
)}
<Typo.p
Expand Down
15 changes: 15 additions & 0 deletions src/translations/pages/departures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,21 @@ const DeparturesInternal = {
loading: _('Laster detaljer', 'Loading details', 'Lastar detaljar'),
noAlighting: _('Ingen avstigning', 'No disembarking', 'Ingen avstiging'),
noBoarding: _('Ingen påstigning', 'No boarding', 'Ingen påstiging'),
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.',
),
requestStop: _(
'Stopper kun ved behov',
'Stops on request only',
'Stoppar berre ved behov',
),
noActiveItem: _(
'Ojda! Noe gikk galt med lasting av detaljer for denne reisen.',
'Oops! We had some issues loading the details for this journey.',
Expand Down
Loading