mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-30 05:01:10 -04:00
fix report download & payments delete issue
This commit is contained in:
@ -136,7 +136,9 @@ export const fatchItemUnit = ({ commit, dispatch, state }, id) => {
|
||||
export const deleteItemUnit = ({ commit, dispatch, state }, id) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.delete(`/api/units/${id}`).then((response) => {
|
||||
commit(types.DELETE_ITEM_UNIT, id)
|
||||
if (!response.data.error) {
|
||||
commit(types.DELETE_ITEM_UNIT, id)
|
||||
}
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
|
||||
@ -154,7 +154,9 @@ export const fetchPaymentMode = ({ commit, dispatch, state }, data) => {
|
||||
export const deletePaymentMode = ({ commit, dispatch, state }, id) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.axios.delete(`/api/payment-methods/${id}`).then((response) => {
|
||||
commit(types.DELETE_PAYMENT_MODE, id)
|
||||
if (!response.data.error) {
|
||||
commit(types.DELETE_PAYMENT_MODE, id)
|
||||
}
|
||||
resolve(response)
|
||||
}).catch((err) => {
|
||||
reject(err)
|
||||
|
||||
Reference in New Issue
Block a user