Skip to content

Commit

Permalink
Merge pull request #1318 from opentripplanner/configure-and-style-ale…
Browse files Browse the repository at this point in the history
…rt-messaging

feat(connected-itinerary-body): add showAlertEffectiveDateTimeText config item to props
  • Loading branch information
josh-willis-arcadis authored Dec 5, 2024
2 parents ea15828 + e6a71e9 commit 1db2b1e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
2 changes: 2 additions & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ itinerary:
showPlanFirstLastButtons: false
# adds the 'about' and '~' prefixes to the duration of non transit legs and trip details panel
showApproximatePrefixAccessLegs: false
# Whether to show the effective date and time of alerts
showAlertEffectiveDateTimeText: true
# Show all walking legs regardless of distance
showAllWalkLegs: false
# Filters out trips returned by OTP by default, unless specifically requested.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class ConnectedItineraryBody extends Component {
const allowUserAlertCollapsing = config?.itinerary?.allowUserAlertCollapsing
const showApproximatePrefixAccessLegs =
config?.itinerary?.showApproximatePrefixAccessLegs
const showAlertEffectiveDateTimeText =
config?.itinerary?.showAlertEffectiveDateTimeText

// Support OTP1 flex messages in Trip Details
// Adding empty pickupBookingInfo and dropOffBookingInfo objects
Expand Down Expand Up @@ -139,6 +141,7 @@ class ConnectedItineraryBody extends Component {
setMainPanelContent(MainPanelContent.TRIP_VIEWER)
}}
showAgencyInfo
showAlertEffectiveDateTimeText={showAlertEffectiveDateTimeText}
showApproximateAccessLegTravelTimes={showApproximatePrefixAccessLegs}
showElevationProfile={config.elevationProfile}
showLegIcon
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@opentripplanner/geocoder": "^3.0.2",
"@opentripplanner/humanize-distance": "^1.2.0",
"@opentripplanner/icons": "3.0.1",
"@opentripplanner/itinerary-body": "6.0.3",
"@opentripplanner/itinerary-body": "6.1.0",
"@opentripplanner/location-field": "3.0.0",
"@opentripplanner/location-icon": "^1.4.1",
"@opentripplanner/map-popup": "5.1.0",
Expand Down
26 changes: 22 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2542,10 +2542,10 @@
"@opentripplanner/core-utils" "^11.4.4"
prop-types "^15.7.2"

"@opentripplanner/itinerary-body@6.0.3", "@opentripplanner/itinerary-body@^6.0.0":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-6.0.3.tgz#84573d20ac9cc1fc7f2d2e032fac5a072ac3e142"
integrity sha512-1qrH8hpR5Rr9KMGNnajI7GJyuoV+rogmyGqd5Z5DErZGp4luVzksIsnyW1IbxRslnV3bqKll+DH8lTXy4QIyZg==
"@opentripplanner/itinerary-body@6.1.0":
version "6.1.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-6.1.0.tgz#8a1399e8dc15b6918ede51a0f263519e4b891415"
integrity sha512-nv42+hJavdVS5nHtKLDv1Um04patzGD+/xh3zApgxpB9xG/D2Zy4JBqbyMtZ1eHKF4JYkmm+NsAq/7043WPXGA==
dependencies:
"@opentripplanner/core-utils" "^12.0.0"
"@opentripplanner/humanize-distance" "^1.2.0"
Expand Down Expand Up @@ -2578,6 +2578,24 @@
react-resize-detector "^4.2.1"
string-similarity "^4.0.4"

"@opentripplanner/itinerary-body@^6.0.0":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-6.0.3.tgz#84573d20ac9cc1fc7f2d2e032fac5a072ac3e142"
integrity sha512-1qrH8hpR5Rr9KMGNnajI7GJyuoV+rogmyGqd5Z5DErZGp4luVzksIsnyW1IbxRslnV3bqKll+DH8lTXy4QIyZg==
dependencies:
"@opentripplanner/core-utils" "^12.0.0"
"@opentripplanner/humanize-distance" "^1.2.0"
"@opentripplanner/icons" "^3.0.0"
"@opentripplanner/location-icon" "^1.4.1"
"@styled-icons/fa-solid" "^10.34.0"
"@styled-icons/foundation" "^10.34.0"
date-fns "^2.28.0"
date-fns-tz "^1.2.2"
flat "^5.0.2"
react-animate-height "^3.0.4"
react-resize-detector "^4.2.1"
string-similarity "^4.0.4"

"@opentripplanner/[email protected]":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@opentripplanner/location-field/-/location-field-3.0.0.tgz#a6f8743290cf088bcd589cf8e6b0d07a651b704a"
Expand Down

0 comments on commit 1db2b1e

Please sign in to comment.