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 loadEstimateData = ({ commit, dispatch, state }) => {
return new Promise((resolve, reject) => {
window.axios.get('/api/report/estimate').then((response) => {
commit(types.SET_ESTIMATES, response.data)
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,11 @@
import * as types from './mutation-types'
export const loadExpensesLink = ({ commit, dispatch, state }, url) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/reports/expenses/link`).then((response) => {
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

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

View File

@ -0,0 +1,5 @@
import * as types from './mutation-types'
export default {
}

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
}
}

View File

@ -0,0 +1,11 @@
import * as types from './mutation-types'
export const loadProfitLossLink = ({ commit, dispatch, state }, url) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/reports/profit-loss/link`).then((response) => {
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

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

View File

@ -0,0 +1,5 @@
import * as types from './mutation-types'
export default {
}

View File

@ -0,0 +1,21 @@
import * as types from './mutation-types'
export const loadLinkByCustomer = ({ commit, dispatch, state }, url) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/reports/sales/customers/link`).then((response) => {
resolve(response)
}).catch((err) => {
reject(err)
})
})
}
export const loadLinkByItems = ({ commit, dispatch, state }, url) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/reports/sales/items/link`).then((response) => {
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

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

View File

@ -0,0 +1,5 @@
import * as types from './mutation-types'
export default {
}

View File

@ -0,0 +1,11 @@
import * as types from './mutation-types'
export const loadTaxesReportLink = ({ commit, dispatch, state }, url) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/reports/tax-summary/link`).then((response) => {
resolve(response)
}).catch((err) => {
reject(err)
})
})
}

View File

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

View File

@ -0,0 +1,5 @@
import * as types from './mutation-types'
export default {
}