summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vuex_shared/modules/modal/mutations.js
blob: 9e96ae8b5a9df4833017a7a6bfaf633487baa98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import * as types from './mutation_types';

export default {
  [types.SHOW](state) {
    state.isVisible = true;
  },
  [types.HIDE](state) {
    state.isVisible = false;
  },
  [types.OPEN](state, data) {
    state.data = data;
    state.isVisible = true;
  },
  [types.CLOSE](state) {
    state.data = null;
    state.isVisible = false;
  },
};