Files
crater/resources/assets/js/store/modules/estimate-template/actions.js
Mohit Panjwani 89ee58590c build version 400
2020-12-02 17:54:08 +05:30

16 lines
432 B
JavaScript

import * as types from './mutation-types'
export const fetchEstimateTemplates = ({ commit, dispatch, state }, params) => {
return new Promise((resolve, reject) => {
window.axios
.get(`/api/v1/estimates/templates`, { params })
.then((response) => {
commit(types.SET_ESTIMATE_TEMPLATES, response.data.templates)
resolve(response)
})
.catch((err) => {
reject(err)
})
})
}