mirror of
https://github.com/crater-invoice/crater.git
synced 2026-02-10 04:42:40 -05:00
build version 400
This commit is contained in:
@@ -13,6 +13,14 @@ export const openModal = ({ commit, dispatch, state }, payload) => {
|
||||
commit(types.SET_DATA, payload.data)
|
||||
}
|
||||
|
||||
if (payload.refreshData) {
|
||||
commit(types.SET_REFRESH_DATA, payload.refreshData)
|
||||
}
|
||||
|
||||
if (payload.variant) {
|
||||
commit(types.SET_VARIANT, payload.variant)
|
||||
}
|
||||
|
||||
if (payload.size) {
|
||||
commit(types.SET_SIZE, payload.size)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
export const modalActive = state => state.active
|
||||
export const modalTitle = state => state.title
|
||||
export const componentName = state => state.componentName
|
||||
export const modalDataID = state => state.id
|
||||
export const modalData = state => state.data
|
||||
export const modalSize = state => state.size
|
||||
export const modalActive = (state) => state.active
|
||||
export const modalTitle = (state) => state.title
|
||||
export const componentName = (state) => state.componentName
|
||||
export const modalDataID = (state) => state.id
|
||||
export const modalData = (state) => state.data
|
||||
export const modalSize = (state) => state.size
|
||||
export const refreshData = (state) => state.refreshData
|
||||
export const variant = (state) => state.variant
|
||||
|
||||
@@ -9,7 +9,9 @@ const initialState = {
|
||||
componentName: '',
|
||||
id: '',
|
||||
size: 'md',
|
||||
data: null
|
||||
data: null,
|
||||
refreshData: null,
|
||||
variant: '',
|
||||
}
|
||||
|
||||
export default {
|
||||
@@ -21,5 +23,5 @@ export default {
|
||||
|
||||
actions: actions,
|
||||
|
||||
mutations: mutations
|
||||
mutations: mutations,
|
||||
}
|
||||
|
||||
@@ -6,3 +6,5 @@ export const SET_ID = 'SET_ID'
|
||||
export const SET_SIZE = 'SET_SIZE'
|
||||
export const SET_DATA = 'SET_DATA'
|
||||
export const RESET_DATA = 'RESET_DATA'
|
||||
export const SET_REFRESH_DATA = 'SET_REFRESH_DATA'
|
||||
export const SET_VARIANT = 'SET_VARIANT'
|
||||
|
||||
@@ -1,40 +1,48 @@
|
||||
import * as types from './mutation-types'
|
||||
|
||||
export default {
|
||||
[types.SHOW_MODAL] (state, data) {
|
||||
[types.SHOW_MODAL](state, data) {
|
||||
state.active = data
|
||||
},
|
||||
|
||||
[types.HIDE_MODAL] (state, data) {
|
||||
[types.HIDE_MODAL](state, data) {
|
||||
state.active = data
|
||||
},
|
||||
|
||||
[types.SET_TITLE] (state, data) {
|
||||
[types.SET_TITLE](state, data) {
|
||||
state.title = data
|
||||
},
|
||||
|
||||
[types.SET_COMPONENT_NAME] (state, data) {
|
||||
[types.SET_COMPONENT_NAME](state, data) {
|
||||
state.componentName = data
|
||||
},
|
||||
|
||||
[types.SET_ID] (state, data) {
|
||||
[types.SET_ID](state, data) {
|
||||
state.id = data
|
||||
},
|
||||
|
||||
[types.SET_DATA] (state, data) {
|
||||
[types.SET_DATA](state, data) {
|
||||
state.data = data
|
||||
},
|
||||
|
||||
[types.SET_SIZE] (state, size) {
|
||||
[types.SET_SIZE](state, size) {
|
||||
state.size = size
|
||||
},
|
||||
|
||||
[types.RESET_DATA] (state) {
|
||||
state.active = false
|
||||
[types.SET_REFRESH_DATA](state, refreshData) {
|
||||
state.refreshData = refreshData
|
||||
},
|
||||
|
||||
[types.RESET_DATA](state) {
|
||||
state.content = ''
|
||||
state.title = ''
|
||||
state.componentName = ''
|
||||
state.id = ''
|
||||
state.data = null
|
||||
}
|
||||
state.refreshData = null
|
||||
},
|
||||
|
||||
[types.SET_VARIANT](state, data) {
|
||||
state.variant = data
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user