fix status action in view invoice

This commit is contained in:
satyaprakash10
2019-11-14 19:54:23 +05:30
parent 5aeac185ea
commit 090c33f63c
5 changed files with 51 additions and 8 deletions

View File

@ -47,6 +47,7 @@ export const fetchViewInvoice = ({ commit, dispatch, state }, id) => {
export const sendEmail = ({ commit, dispatch, state }, data) => {
return new Promise((resolve, reject) => {
window.axios.post(`/api/invoices/send`, data).then((response) => {
commit(types.UPDATE_INVOICE_STATUS, {id: data.id, status: 'SENT'})
resolve(response)
}).catch((err) => {
reject(err)