mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Merge branch 'fix-send-invoice-issue' into 'master'
fix send invoices and payments issues See merge request mohit.panjvani/crater-web!1443
This commit is contained in:
@ -260,6 +260,8 @@ async function submitForm() {
|
|||||||
|
|
||||||
const response = await invoiceStore.sendInvoice(invoiceMailForm)
|
const response = await invoiceStore.sendInvoice(invoiceMailForm)
|
||||||
|
|
||||||
|
isLoading.value = false
|
||||||
|
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
closeSendInvoiceModal()
|
closeSendInvoiceModal()
|
||||||
return true
|
return true
|
||||||
|
|||||||
@ -257,6 +257,8 @@ async function sendPaymentData() {
|
|||||||
|
|
||||||
const response = await paymentStore.sendEmail(paymentMailForm)
|
const response = await paymentStore.sendEmail(paymentMailForm)
|
||||||
|
|
||||||
|
isLoading.value = false
|
||||||
|
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
closeSendPaymentModal()
|
closeSendPaymentModal()
|
||||||
return true
|
return true
|
||||||
|
|||||||
@ -93,7 +93,6 @@ export const usePaymentStore = (useWindow = false) => {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
fetchPayments(params) {
|
fetchPayments(params) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios
|
axios
|
||||||
@ -289,6 +288,11 @@ export const usePaymentStore = (useWindow = false) => {
|
|||||||
axios
|
axios
|
||||||
.post(`/api/v1/payments/${data.id}/send`, data)
|
.post(`/api/v1/payments/${data.id}/send`, data)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
const notificationStore = useNotificationStore()
|
||||||
|
notificationStore.showNotification({
|
||||||
|
type: 'success',
|
||||||
|
message: global.t('payments.send_payment_successfully'),
|
||||||
|
})
|
||||||
resolve(response)
|
resolve(response)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user