Skip to content

Commit

Permalink
Merge branch 'fix-send-invoice-issue' into 'master'
Browse files Browse the repository at this point in the history
fix send invoices and payments issues

See merge request mohit.panjvani/crater-web!1443
  • Loading branch information
mohitpanjwani committed Feb 17, 2022
2 parents eef74fd + 7170fb0 commit 6529fa1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ async function submitForm() {
const response = await invoiceStore.sendInvoice(invoiceMailForm)
isLoading.value = false
if (response.data.success) {
closeSendInvoiceModal()
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ async function sendPaymentData() {
const response = await paymentStore.sendEmail(paymentMailForm)
isLoading.value = false
if (response.data.success) {
closeSendPaymentModal()
return true
Expand Down
6 changes: 5 additions & 1 deletion resources/scripts/admin/stores/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export const usePaymentStore = (useWindow = false) => {
})
},


fetchPayments(params) {
return new Promise((resolve, reject) => {
axios
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 6529fa1

Please sign in to comment.