aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/routes/index.js
diff options
context:
space:
mode:
authorcedricnjanga2018-04-03 10:44:47 -0700
committercedricnjanga2018-04-03 10:44:47 -0700
commit665f90e2b8e87a91700f687ded8e036b12178cc8 (patch)
treeb0c2f4540c615315fe9ced1e389bb96ec7afe262 /app/javascript/routes/index.js
parentb274526124fb5e2242ff482ab504a7ae59dd817b (diff)
downloadchouette-core-665f90e2b8e87a91700f687ded8e036b12178cc8.tar.bz2
Refs #6383 Fix Stop point defautlt attributes6383-stop-point-default-attributes
Diffstat (limited to 'app/javascript/routes/index.js')
-rw-r--r--app/javascript/routes/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/routes/index.js b/app/javascript/routes/index.js
index 3c7322953..fc99a3086 100644
--- a/app/javascript/routes/index.js
+++ b/app/javascript/routes/index.js
@@ -22,6 +22,7 @@ const getInitialState = () => {
let fancyText = v.name.replace("'", "\'")
if(v.zip_code && v.city_name)
fancyText += ", " + v.zip_code + " " + v.city_name.replace("'", "\'")
+ forAlightingAndBoarding = v.stoparea_kind === 'commercial' ? 'normal' : 'forbidden'
state.push({
stoppoint_id: v.stoppoint_id,
@@ -37,8 +38,8 @@ const getInitialState = () => {
name: v.name ? v.name.replace("'", "\'") : '',
registration_number: v.registration_number,
text: fancyText,
- for_boarding: v.for_boarding || '',
- for_alighting: v.for_alighting || '',
+ for_boarding: v.for_boarding || forAlightingAndBoarding,
+ for_alighting: v.for_alighting || forAlightingAndBoarding,
longitude: v.longitude || 0,
latitude: v.latitude || 0,
comment: v.comment ? v.comment.replace("'", "\'") : '',