diff options
| author | Zog | 2018-01-17 12:36:15 +0100 |
|---|---|---|
| committer | Zog | 2018-01-17 12:36:15 +0100 |
| commit | 2eb5225e23c91656f0f35087adfd1545218ecb23 (patch) | |
| tree | 8f53ea38e19026ea399eaa41e4ac8b02b7626acf | |
| parent | 351af77182537dbb53e7bbd99d37dde50cd11ffe (diff) | |
| download | chouette-core-2eb5225e23c91656f0f35087adfd1545218ecb23.tar.bz2 | |
Refs #5623; Show journey departure time inputs when JP is prefilled5623-fix-schedule-when-jp-is-prefilled
| -rw-r--r-- | app/javascript/vehicle_journeys/reducers/modal.js | 9 | ||||
| -rw-r--r-- | app/views/vehicle_journeys/index.html.slim | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/app/javascript/vehicle_journeys/reducers/modal.js b/app/javascript/vehicle_journeys/reducers/modal.js index c2556303d..fb7e16547 100644 --- a/app/javascript/vehicle_journeys/reducers/modal.js +++ b/app/javascript/vehicle_journeys/reducers/modal.js @@ -147,14 +147,7 @@ export default function modal(state = {}, action) { let stopAreas = _.map(window.jpOriginStopPoints, (sa, i) =>{ return _.assign({}, {stop_area_short_description : {id : sa.stop_area_id}}) }) - selectedJP = { - id: window.jpOrigin.id, - name: window.jpOrigin.name, - published_name: window.jpOrigin.published_name, - objectid: window.jpOrigin.objectid, - stop_areas: stopAreas, - missions: state.missions - } + selectedJP = _.assign({}, window.jpOrigin, {stop_areas: stopAreas}) } return { type: 'create', diff --git a/app/views/vehicle_journeys/index.html.slim b/app/views/vehicle_journeys/index.html.slim index f7796b188..2c7a3b97d 100644 --- a/app/views/vehicle_journeys/index.html.slim +++ b/app/views/vehicle_journeys/index.html.slim @@ -17,7 +17,7 @@ = javascript_tag do | window.route_id = #{params[:route_id]}; | window.stopPoints = #{(@stop_points_list.to_json).html_safe}; - | window.jpOrigin = #{(@jp_origin.to_json).html_safe}; + | window.jpOrigin = #{(@jp_origin.attributes.update({full_schedule: @jp_origin.full_schedule?}).to_json).html_safe}; | window.jpOriginStopPoints = #{(@jp_origin_stop_points.to_json).html_safe}; | window.transportMode = #{(@transport_mode.to_json).html_safe}; | window.transportSubmode = #{(@transport_submode.to_json).html_safe}; |
