init crater

This commit is contained in:
Mohit Panjwani
2019-11-11 12:16:00 +05:30
commit bdf2ba51d6
668 changed files with 158503 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import * as types from './mutation-types'
export const loadInvoiceData = ({ commit, dispatch, state },data) => {
return new Promise((resolve, reject) => {
window.axios.post('/api/report/invoice', data).then((response) => {
commit(types.SET_INVOICES, response.data)
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

@ -0,0 +1 @@
export const invoices = (state) => state.invoices

View File

@ -0,0 +1,19 @@
import mutations from './mutations'
import * as actions from './actions'
import * as getters from './getters'
const initialState = {
invoices: []
}
export default {
namespaced: true,
state: initialState,
getters: getters,
actions: actions,
mutations: mutations
}

View File

@ -0,0 +1 @@
export const SET_INVOICES = 'SET_INVOICES'

View File

@ -0,0 +1,7 @@
import * as types from './mutation-types'
export default {
[types.SET_INVOICES] (state, data) {
state.invoices = data.invoices
}
}