aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js b/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
index 5d2b0bdd2..074dc0919 100644
--- a/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
+++ b/app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js
@@ -14,19 +14,21 @@ const actions = {
.then(response => response.json())
.then((json) => {
console.log(json)
- for (let [i, val] of json.entries()){
- let stop_points = []
- for (let [i, stopArea] of val['stop_area_short_descriptions'].entries()){
- stop_points.push("id", false)
+ let stop_points = []
+ for (let val of json){
+ for (let stop_point of val.route_short_description.stop_points){
+ stop_point.checked = false
+ stop_points[stop_point.object_id] = stop_point
}
- for (let [i, stopArea] of val['stop_area_short_descriptions'].entries()){
- stop_points["id"] = true
+ // for (let stopArea of val.stop_area_short_descriptions){
+ // debugger
+ // stop_points[stopArea.stop_area_short_description.object_id].checked = true
}
state.push({
name: val.name,
object_id: val.object_id,
- published_name: val.published_name
- // stop_points: stop_points
+ published_name: val.published_name,
+ stop_points: stop_points
})
}
dispatch(actions.receiveJourneyPatterns(state))