aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/routes/actions/index.js
diff options
context:
space:
mode:
authorcedricnjanga2018-03-15 12:41:29 -0700
committerJohan Van Ryseghem2018-03-29 11:28:28 +0200
commit1019debe93d776f0d38ae69099e6492a7dd4a87c (patch)
tree16903e673284d4d378f6794a58e7ed6ff4c9da40 /app/javascript/routes/actions/index.js
parent23318bbe07b73cef50ec69d5e597386a116e2b82 (diff)
downloadchouette-core-1019debe93d776f0d38ae69099e6492a7dd4a87c.tar.bz2
Refs #6075 Change default attributes for stop areas
Diffstat (limited to 'app/javascript/routes/actions/index.js')
-rw-r--r--app/javascript/routes/actions/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/javascript/routes/actions/index.js b/app/javascript/routes/actions/index.js
index 13b2d60b2..5fbf5bce9 100644
--- a/app/javascript/routes/actions/index.js
+++ b/app/javascript/routes/actions/index.js
@@ -56,7 +56,12 @@ const actions = {
unselectMarker: (index) => ({
type: 'UNSELECT_MARKER',
index
- })
+ }),
+ defaultAttribute: (attribute, stopAreaKind) => {
+ if (attribute !== '') return attribute
+ if (stopAreaKind === undefined) return ''
+ return stopAreaKind === "commercial" ? "normal" : "forbidden"
+ }
}
module.exports = actions