aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorThomas Haddad2017-04-18 15:39:04 +0200
committerThomas Haddad2017-04-18 15:39:04 +0200
commitc41b4723c0b7b0a1c93d5980cefafad0976445f0 (patch)
tree4d1fbcbace278735631a25ef93794512ff5fa352 /app/assets/javascripts
parentc4597f1c720eb45863415d63b1ac3417fb11503e (diff)
downloadchouette-core-c41b4723c0b7b0a1c93d5980cefafad0976445f0.tar.bz2
Refs #2896: Fix current_month not being updated after page changing for synthesis
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js b/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js
index ba770df26..23c943d13 100644
--- a/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js
+++ b/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js
@@ -12,9 +12,10 @@ const timetable = (state = {}, action) => {
})
return _.assign({}, fetchedState, {current_month: actions.updateSynthesis(fetchedState)})
case 'RECEIVE_MONTH':
- return _.assign({}, state, {
+ let newState = _.assign({}, state, {
current_month: action.json.days
})
+ return _.assign({}, newState, {current_month: actions.updateSynthesis(newState)})
case 'GO_TO_PREVIOUS_PAGE':
case 'GO_TO_NEXT_PAGE':
let nextPage = action.nextPage ? 1 : -1