diff options
Diffstat (limited to 'app/assets/javascripts/search/store/mutations.js')
-rw-r--r-- | app/assets/javascripts/search/store/mutations.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/search/store/mutations.js b/app/assets/javascripts/search/store/mutations.js index c1339845272..f9fd69d2211 100644 --- a/app/assets/javascripts/search/store/mutations.js +++ b/app/assets/javascripts/search/store/mutations.js @@ -36,4 +36,13 @@ export default { const item = { ...state.navigation[key], count }; state.navigation = { ...state.navigation, [key]: item }; }, + [types.REQUEST_AGGREGATIONS](state) { + state.aggregations = { fetching: true, error: false, data: [] }; + }, + [types.RECEIVE_AGGREGATIONS_SUCCESS](state, data) { + state.aggregations = { fetching: false, error: false, data: [...data] }; + }, + [types.RECEIVE_AGGREGATIONS_ERROR](state) { + state.aggregations = { fetching: false, error: true, data: [] }; + }, }; |