diff options
| author | cedricnjanga | 2018-04-03 10:44:47 -0700 |
|---|---|---|
| committer | cedricnjanga | 2018-04-03 10:44:47 -0700 |
| commit | 665f90e2b8e87a91700f687ded8e036b12178cc8 (patch) | |
| tree | b0c2f4540c615315fe9ced1e389bb96ec7afe262 /app/javascript/routes/reducers/stopPoints.js | |
| parent | b274526124fb5e2242ff482ab504a7ae59dd817b (diff) | |
| download | chouette-core-665f90e2b8e87a91700f687ded8e036b12178cc8.tar.bz2 | |
Refs #6383 Fix Stop point defautlt attributes6383-stop-point-default-attributes
Diffstat (limited to 'app/javascript/routes/reducers/stopPoints.js')
| -rw-r--r-- | app/javascript/routes/reducers/stopPoints.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/javascript/routes/reducers/stopPoints.js b/app/javascript/routes/reducers/stopPoints.js index ba183d002..54142338d 100644 --- a/app/javascript/routes/reducers/stopPoints.js +++ b/app/javascript/routes/reducers/stopPoints.js @@ -8,8 +8,8 @@ const stopPoint = (state = {}, action, length) => { text: '', index: length, edit: true, - for_boarding: '', - for_alighting: '', + for_boarding: 'normal', + for_alighting: 'normal', olMap: { isOpened: false, json: {} @@ -61,6 +61,7 @@ const stopPoints = (state = [], action) => { case 'UPDATE_INPUT_VALUE': return state.map( (t, i) => { if (i === action.index) { + let forAlightingAndBoarding = action.text.stoparea_kind === 'commercial' ? 'normal' : 'forbidden' return _.assign( {}, t, @@ -77,7 +78,9 @@ const stopPoints = (state = [], action) => { area_type: action.text.area_type, city_name: action.text.city_name, comment: action.text.comment, - registration_number: action.text.registration_number + registration_number: action.text.registration_number, + for_alighting: forAlightingAndBoarding, + for_boarding: forAlightingAndBoarding } ) } else { |
