diff options
| author | Thomas Haddad | 2016-12-09 18:17:16 +0100 |
|---|---|---|
| committer | Thomas Haddad | 2016-12-09 18:17:16 +0100 |
| commit | 77f87c1879efc2f04a97a5c0a6c241c9d805cd20 (patch) | |
| tree | 563d97322be939fa5c0cc8663d2b115a48999e1b /app/assets/javascripts/es6_browserified | |
| parent | d26d8517b13334956de84cb7b84d8e6e2ff51b13 (diff) | |
| download | chouette-core-77f87c1879efc2f04a97a5c0a6c241c9d805cd20.tar.bz2 | |
Retrieve stop_areas for each journey_pattern, still need to sort / select it Refs #2204
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/assets/javascripts/es6_browserified')
| -rw-r--r-- | app/assets/javascripts/es6_browserified/journey_patterns/actions/index.js | 18 |
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)) |
