2018-06-26 11:39:43 +02:00
|
|
|
import * as types from './mutations-types';
|
|
|
|
|
|
|
|
export const initialState = {
|
2018-07-04 18:20:28 +02:00
|
|
|
isLoading: false,
|
2018-06-26 11:39:43 +02:00
|
|
|
reports: [],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mutations = {
|
2018-07-04 18:20:28 +02:00
|
|
|
[types.IS_LOADING](state) {
|
|
|
|
state.isLoading = true;
|
|
|
|
},
|
|
|
|
[types.IS_DONE_LOADING](state) {
|
|
|
|
state.isLoading = false;
|
|
|
|
},
|
2018-06-26 11:39:43 +02:00
|
|
|
[types.STORE_REPORTS](state, { reports }) {
|
|
|
|
state.reports = reports;
|
|
|
|
},
|
|
|
|
[types.PUSH_REPORT](state, { report }) {
|
|
|
|
state.reports.push(report);
|
|
|
|
},
|
|
|
|
};
|