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 45 46 47 48 49 50 51 52 53 54 | 71x 5x 5x 7x 7x 7x 6x 6x 2x 2x 3x 3x 3x 4x 4x 1x 1x 1x 1x 1x 1x 1x | import { cloneDeep } from 'lodash'; import { APPROVAL_SETTINGS_I18N } from '../../../constants'; import * as types from './mutation_types'; export default (mapDataToState) => ({ [types.REQUEST_SETTINGS](state) { state.isLoading = true; state.errorMessage = ''; }, [types.RECEIVE_SETTINGS_SUCCESS](state, data) { state.settings = mapDataToState(data); state.initialSettings = cloneDeep(state.settings); state.isLoading = false; }, [types.RECEIVE_SETTINGS_ERROR](state) { state.isLoading = false; state.errorMessage = APPROVAL_SETTINGS_I18N.loadingErrorMessage; }, [types.REQUEST_UPDATE_SETTINGS](state) { state.isLoading = true; state.errorMessage = ''; }, [types.UPDATE_SETTINGS_SUCCESS](state, data) { state.settings = mapDataToState(data); state.initialSettings = cloneDeep(state.settings); state.isLoading = false; }, [types.UPDATE_SETTINGS_ERROR](state) { state.isLoading = false; state.errorMessage = APPROVAL_SETTINGS_I18N.savingErrorMessage; }, [types.DISMISS_ERROR_MESSAGE](state) { state.errorMessage = ''; }, [types.SET_PREVENT_AUTHOR_APPROVAL](state, value) { state.settings.preventAuthorApproval.value = value; }, [types.SET_PREVENT_COMMITTERS_APPROVAL](state, value) { state.settings.preventCommittersApproval.value = value; }, [types.SET_PREVENT_MR_APPROVAL_RULE_EDIT](state, value) { state.settings.preventMrApprovalRuleEdit.value = value; }, [types.SET_REMOVE_APPROVALS_ON_PUSH](state, value) { state.settings.removeApprovalsOnPush.value = value; }, [types.SET_SELECTIVE_CODE_OWNER_REMOVALS](state, value) { state.settings.selectiveCodeOwnerRemovals.value = value; }, [types.SET_REQUIRE_USER_PASSWORD](state, value) { state.settings.requireUserPassword.value = value; }, }); |