fix send invoices and payments issues

This commit is contained in:
asift798
2022-02-16 18:59:49 +05:30
parent db7a084a19
commit 7170fb0cef
3 changed files with 9 additions and 1 deletions

View File

@ -260,6 +260,8 @@ async function submitForm() {
const response = await invoiceStore.sendInvoice(invoiceMailForm)
isLoading.value = false
if (response.data.success) {
closeSendInvoiceModal()
return true

View File

@ -257,6 +257,8 @@ async function sendPaymentData() {
const response = await paymentStore.sendEmail(paymentMailForm)
isLoading.value = false
if (response.data.success) {
closeSendPaymentModal()
return true

View File

@ -93,7 +93,6 @@ export const usePaymentStore = (useWindow = false) => {
})
},
fetchPayments(params) {
return new Promise((resolve, reject) => {
axios
@ -289,6 +288,11 @@ export const usePaymentStore = (useWindow = false) => {
axios
.post(`/api/v1/payments/${data.id}/send`, data)
.then((response) => {
const notificationStore = useNotificationStore()
notificationStore.showNotification({
type: 'success',
message: global.t('payments.send_payment_successfully'),
})
resolve(response)
})
.catch((err) => {