diff --git a/lib/components/narrative/line-itin/realtime-time-column.tsx b/lib/components/narrative/line-itin/realtime-time-column.tsx
index 303a700d9..121673468 100644
--- a/lib/components/narrative/line-itin/realtime-time-column.tsx
+++ b/lib/components/narrative/line-itin/realtime-time-column.tsx
@@ -1,5 +1,5 @@
import { FormattedTime } from 'react-intl'
-import { isTransitLeg } from '@opentripplanner/core-utils/lib/itinerary'
+import { isFlex, isTransitLeg } from '@opentripplanner/core-utils/lib/itinerary'
import { Leg } from '@opentripplanner/types'
import React, { ReactElement } from 'react'
import styled from 'styled-components'
@@ -50,6 +50,7 @@ function RealtimeTimeColumn({ isDestination, leg }: Props): ReactElement {
return (
default:
- return null
+ return minutes
}
}
diff --git a/lib/components/viewers/realtime-status-label.tsx b/lib/components/viewers/realtime-status-label.tsx
index c0357f789..899e552cb 100644
--- a/lib/components/viewers/realtime-status-label.tsx
+++ b/lib/components/viewers/realtime-status-label.tsx
@@ -65,6 +65,7 @@ const STATUS = {
const RealtimeStatusLabel = ({
className,
delay,
+ isFlex = false,
isRealtime,
onTimeThresholdSeconds,
originalTime,
@@ -74,6 +75,7 @@ const RealtimeStatusLabel = ({
}: {
className?: string
delay: number
+ isFlex: boolean
isRealtime?: boolean
onTimeThresholdSeconds?: number
originalTime?: number
@@ -125,7 +127,9 @@ const RealtimeStatusLabel = ({
{showScheduleDeviation && (
+ ) : isEarlyOrLate ? (
)}
- {isEarlyOrLate && (
+ {isEarlyOrLate && !isFlex && (
({
onTimeThresholdSeconds: state.otp.config.onTimeThresholdSeconds,
- showScheduleDeviation: state.otp.config.showScheduleDeviation
+ showScheduleDeviation: state.otp.config?.itinerary?.showScheduleDeviation
})
export default connect(mapStateToProps)(RealtimeStatusLabel)
diff --git a/lib/util/config-types.ts b/lib/util/config-types.ts
index 64a6ff3f4..94ea5eaf7 100644
--- a/lib/util/config-types.ts
+++ b/lib/util/config-types.ts
@@ -301,6 +301,8 @@ export interface ItineraryConfig {
showLegDurations?: boolean
showPlanFirstLastButtons?: boolean
showRouteFares?: boolean
+ /** Whether to show the x minutes late/early in the itinerary body */
+ showScheduleDeviation?: boolean
sortModes?: ItinerarySortOption[]
syncSortWithDepartArrive?: boolean
weights?: ItineraryCostWeights
@@ -423,8 +425,6 @@ export interface AppConfig {
routeViewer?: RouteViewerConfig
/** Approx delay in seconds to reset the UI to an initial URL if there is no user activity */
sessionTimeoutSeconds?: number
- /** Whether to show the x minutes late/early in the itinerary body */
- showScheduleDeviation?: boolean
stopViewer?: StopScheduleViewerConfig
/** Externally hosted terms of service URL */
termsOfServiceLink?: string