All files / ee/app/assets/javascripts/epic/store mutations.js

100% Statements 12/12
100% Branches 0/0
100% Functions 11/11
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44        26x       24x       1x     1x 1x     1x       16x       1x     1x     1x     1x       1x      
import * as types from './mutation_types';
 
export default {
  [types.SET_EPIC_META](state, meta) {
    Object.assign(state, { ...meta });
  },
 
  [types.SET_EPIC_DATA](state, data) {
    Object.assign(state, { ...data });
  },
 
  [types.REQUEST_EPIC_STATUS_CHANGE](state) {
    state.epicStatusChangeInProgress = true;
  },
  [types.REQUEST_EPIC_STATUS_CHANGE_SUCCESS](state, data) {
    state.state = data.state;
    state.epicStatusChangeInProgress = false;
  },
  [types.REQUEST_EPIC_STATUS_CHANGE_FAILURE](state) {
    state.epicStatusChangeInProgress = false;
  },
 
  [types.TOGGLE_SIDEBAR](state, isSidebarCollapsed) {
    state.sidebarCollapsed = isSidebarCollapsed;
  },
 
  [types.SET_EPIC_CREATE_TITLE](state, { newEpicTitle }) {
    state.newEpicTitle = newEpicTitle;
  },
  [types.SET_EPIC_CREATE_CONFIDENTIAL](state, { newEpicConfidential }) {
    state.newEpicConfidential = newEpicConfidential;
  },
  [types.REQUEST_EPIC_CREATE](state) {
    state.epicCreateInProgress = true;
  },
  [types.REQUEST_EPIC_CREATE_FAILURE](state) {
    state.epicCreateInProgress = false;
  },
 
  [types.SET_EPIC_CONFIDENTIAL](state, confidential) {
    state.confidential = confidential;
  },
};