From 0d95949fb6ee86f1aed30b9df4efe0dc6444b3e0 Mon Sep 17 00:00:00 2001
From: Zog
Date: Thu, 22 Feb 2018 10:46:04 +0100
Subject: Refs #5993; Homogenize calendars display
---
app/javascript/vehicle_journeys/actions/index.js | 4 +++-
app/javascript/vehicle_journeys/components/VehicleJourney.js | 3 ++-
app/javascript/vehicle_journeys/components/VehicleJourneys.js | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
(limited to 'app/javascript')
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js
index b398d78fa..e67753e4b 100644
--- a/app/javascript/vehicle_journeys/actions/index.js
+++ b/app/javascript/vehicle_journeys/actions/index.js
@@ -92,7 +92,9 @@ const actions = {
id: selectedTT.id,
comment: selectedTT.comment,
objectid: selectedTT.objectid,
- color: selectedTT.color
+ color: selectedTT.color,
+ bounding_dates: selectedTT.time_table_bounding,
+ days: selectedTT.day_types
}
}),
addSelectedTimetable: () => ({
diff --git a/app/javascript/vehicle_journeys/components/VehicleJourney.js b/app/javascript/vehicle_journeys/components/VehicleJourney.js
index e11e91497..7db0cee1c 100644
--- a/app/javascript/vehicle_journeys/components/VehicleJourney.js
+++ b/app/javascript/vehicle_journeys/components/VehicleJourney.js
@@ -66,6 +66,7 @@ export default class VehicleJourney extends Component {
render() {
this.previousCity = undefined
let detailed_calendars = this.hasFeature('detailed_calendars') && !this.disabled
+ let detailed_calendars_shown = $('.detailed-timetables-bt').hasClass('active')
let {time_tables, purchase_windows} = this.props.value
return (
@@ -110,7 +111,7 @@ export default class VehicleJourney extends Component {
{this.props.disabled &&
{this.timeTableURL(tt)}
-{tt.bounding_dates}
+{tt.bounding_dates.split(' ').join(' > ')}