From 1f2d51a8ba620657682929650d382877839304b8 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:51:22 -0500 Subject: [PATCH 1/3] refactor: make show trip button configurable --- .../narrative/line-itin/connected-itinerary-body.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/components/narrative/line-itin/connected-itinerary-body.js b/lib/components/narrative/line-itin/connected-itinerary-body.js index 9ed6d239b..598c6c93d 100644 --- a/lib/components/narrative/line-itin/connected-itinerary-body.js +++ b/lib/components/narrative/line-itin/connected-itinerary-body.js @@ -78,6 +78,9 @@ class ConnectedItineraryBody extends Component { } = this.props const clonedItinerary = clone(itinerary) + const showViewTripButton = + config?.itinerary?.showTripViewerButton !== false && true + // Support OTP1 flex messages in Trip Details // Adding empty pickupBookingInfo and dropOffBookingInfo objects // to a leg will trigger relevant flex pickup / dropoff descriptions in @@ -130,7 +133,7 @@ class ConnectedItineraryBody extends Component { showLegIcon showMapButtonColumn={false} showRouteFares={config.itinerary && config.itinerary.showRouteFares} - showViewTripButton + showViewTripButton={showViewTripButton} TimeColumnContent={RealtimeTimeColumn} toRouteAbbreviation={noop} TransitLegSubheader={TransitLegSubheader} From b6b70fcd09fa069adcc87858c1aa5adbc1c8a343 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:54:48 -0500 Subject: [PATCH 2/3] rename variable --- lib/components/narrative/line-itin/connected-itinerary-body.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/narrative/line-itin/connected-itinerary-body.js b/lib/components/narrative/line-itin/connected-itinerary-body.js index 598c6c93d..0545f9ae5 100644 --- a/lib/components/narrative/line-itin/connected-itinerary-body.js +++ b/lib/components/narrative/line-itin/connected-itinerary-body.js @@ -79,7 +79,7 @@ class ConnectedItineraryBody extends Component { const clonedItinerary = clone(itinerary) const showViewTripButton = - config?.itinerary?.showTripViewerButton !== false && true + config?.itinerary?.showViewTripButton !== false && true // Support OTP1 flex messages in Trip Details // Adding empty pickupBookingInfo and dropOffBookingInfo objects From 199a73db9cee1f414b299787bde1789b09ea3b12 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:51:52 -0500 Subject: [PATCH 3/3] refactor: change config variable --- lib/components/narrative/line-itin/connected-itinerary-body.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/components/narrative/line-itin/connected-itinerary-body.js b/lib/components/narrative/line-itin/connected-itinerary-body.js index 0545f9ae5..81cdb475a 100644 --- a/lib/components/narrative/line-itin/connected-itinerary-body.js +++ b/lib/components/narrative/line-itin/connected-itinerary-body.js @@ -78,8 +78,7 @@ class ConnectedItineraryBody extends Component { } = this.props const clonedItinerary = clone(itinerary) - const showViewTripButton = - config?.itinerary?.showViewTripButton !== false && true + const showViewTripButton = !config?.itinerary?.hideViewTripButton // Support OTP1 flex messages in Trip Details // Adding empty pickupBookingInfo and dropOffBookingInfo objects