aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haddad2017-04-13 11:46:58 +0200
committerThomas Haddad2017-04-13 11:47:23 +0200
commitdfaf9a99c29f39ddaaaac07f31f2011a77dad049 (patch)
tree50558257b00e75767d7b39b9e1c6f89b9fef88aa
parente96d13ce82e9d9c6aff0468c385979d62ea67e64 (diff)
downloadchouette-core-dfaf9a99c29f39ddaaaac07f31f2011a77dad049.tar.bz2
Add current_periode_range in time tables rabl
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
-rw-r--r--app/assets/javascripts/es6_browserified/time_tables/actions/index.js2
-rw-r--r--app/views/time_tables/show.rabl1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/es6_browserified/time_tables/actions/index.js b/app/assets/javascripts/es6_browserified/time_tables/actions/index.js
index d06eaecff..39e9aba02 100644
--- a/app/assets/javascripts/es6_browserified/time_tables/actions/index.js
+++ b/app/assets/javascripts/es6_browserified/time_tables/actions/index.js
@@ -3,7 +3,7 @@ const actions = {
let weekDays = ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa']
let array = []
weekDays.map((day, i) =>{
- array[i] = (str.indexOf(day) != -1) ? true: false
+ array[i] = (str.indexOf(day) != -1) ? true : false
})
return array
diff --git a/app/views/time_tables/show.rabl b/app/views/time_tables/show.rabl
index a4434c518..04238c716 100644
--- a/app/views/time_tables/show.rabl
+++ b/app/views/time_tables/show.rabl
@@ -8,6 +8,7 @@ node do |tt|
day_types: %w(monday tuesday wednesday thursday friday saturday sunday).select{ |d| tt.send(d) }.map{ |d| tt.human_attribute_name(d).first(2)}.join(''),
current_month: tt.month_inspect(Date.today),
periode_range: month_periode_enum(3),
+ current_periode_range: Date.today.beginning_of_month
}
end