aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-02-22 10:46:04 +0100
committerZog2018-02-22 10:46:04 +0100
commit0d95949fb6ee86f1aed30b9df4efe0dc6444b3e0 (patch)
tree6c6e3aa44fb8c606848c26751b852793c44e262c
parentb5db0e9477f22e0d2acdd40c5db710f16d517a10 (diff)
downloadchouette-core-0d95949fb6ee86f1aed30b9df4efe0dc6444b3e0.tar.bz2
Refs #5993; Homogenize calendars display5993-enhance-detailed-calendar
-rw-r--r--app/javascript/vehicle_journeys/actions/index.js4
-rw-r--r--app/javascript/vehicle_journeys/components/VehicleJourney.js3
-rw-r--r--app/javascript/vehicle_journeys/components/VehicleJourneys.js2
3 files changed, 6 insertions, 3 deletions
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 && <VehicleJourneyInfoButton vehicleJourney={this.props.value} />}
{ detailed_calendars &&
- <div className="detailed-timetables hidden">
+ <div className={"detailed-timetables" + (detailed_calendars_shown ? "" : " hidden")}>
{this.props.allTimeTables.map((tt, i) =>
<div key={i} className={(this.hasTimeTable(time_tables, tt) ? "active" : "inactive")}></div>
)}
diff --git a/app/javascript/vehicle_journeys/components/VehicleJourneys.js b/app/javascript/vehicle_journeys/components/VehicleJourneys.js
index 843aec1a8..384afba17 100644
--- a/app/javascript/vehicle_journeys/components/VehicleJourneys.js
+++ b/app/javascript/vehicle_journeys/components/VehicleJourneys.js
@@ -187,7 +187,7 @@ export default class VehicleJourneys extends Component {
<p>
{this.timeTableURL(tt)}
</p>
- <p>{tt.bounding_dates}</p>
+ <p>{tt.bounding_dates.split(' ').join(' > ')}</p>
</div>
)}
</div>