mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-30 05:01:10 -04:00
fix status action in view estimate
This commit is contained in:
@ -56,6 +56,7 @@ export const fetchViewEstimate = ({ commit, dispatch, state }, id) => {
|
||||
export const sendEmail = ({ commit, dispatch, state }, data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.post(`/api/estimates/send`, data).then((response) => {
|
||||
commit(types.UPDATE_ESTIMATE_STATUS, {id: data.id, status: 'SENT'})
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
@ -100,7 +101,7 @@ export const deleteMultipleEstimates = ({ commit, dispatch, state }, id) => {
|
||||
export const updateEstimate = ({ commit, dispatch, state }, data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.put(`/api/estimates/${data.id}`, data).then((response) => {
|
||||
commit(types.UPDATE_ESTIMATE, response.data)
|
||||
commit(types.UPDATE_ESTIMATE_STATUS, response.data)
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
|
||||
Reference in New Issue
Block a user