mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-31 21:51:10 -04:00
init crater
This commit is contained in:
21
resources/assets/js/store/modules/reports/sales/actions.js
Normal file
21
resources/assets/js/store/modules/reports/sales/actions.js
Normal 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)
|
||||
})
|
||||
})
|
||||
}
|
||||
19
resources/assets/js/store/modules/reports/sales/index.js
Normal file
19
resources/assets/js/store/modules/reports/sales/index.js
Normal 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
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
import * as types from './mutation-types'
|
||||
|
||||
export default {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user