classic-ui/modules/account/store/mutations/Domain.js
Danil Kovtonyuk 44f31f8b9f
init
2022-04-22 13:14:19 +10:00

35 lines
856 B
JavaScript

export const domain = {
CLEAR_STATE(state, { netId, key }) {
this._vm.$set(state.domain[`netId${netId}`], key, {
isError: false,
isSuccess: false,
isFetching: false,
errorMessage: ''
})
},
SET_DOMAIN_REQUEST(state, { netId, key }) {
this._vm.$set(state.domain[`netId${netId}`], key, {
isError: false,
isSuccess: false,
isFetching: true,
errorMessage: ''
})
},
SET_DOMAIN_FAILED(state, { netId, key, errorMessage }) {
this._vm.$set(state.domain[`netId${netId}`], key, {
errorMessage,
isError: true,
isSuccess: false,
isFetching: false
})
},
SET_DOMAIN_SUCCESS(state, { netId, key }) {
this._vm.$set(state.domain[`netId${netId}`], key, {
isError: false,
isSuccess: true,
isFetching: false,
errorMessage: ''
})
}
}