diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue index 244ba240..f93ba436 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingComponent.vue @@ -68,10 +68,10 @@ - MYR {{(Math.round((item.outstanding + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}} -
+
Make Payment
@@ -238,6 +238,17 @@ latestComment() { let questions = this.item.remarks; return questions.slice().reverse()[0]; + }, + paymentPending(){ + if (Array.isArray(this.item.transactions)) { + for (let i = 0; i < this.item.transactions.length; i++) { + const status = this.item.transactions[i].status; + if (status === 1) { + return true; + } + } + } + return false; } }, created(){ diff --git a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue index bd861a20..3ff38d1f 100644 --- a/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/forms/PaymentFormComponent.vue @@ -157,6 +157,7 @@ this.error = response.payload.data.message; } else{ + this.closeModal(); this.updateList(); } } diff --git a/resources/assets/vue/components/paymentsBilling/forms/PaymentVerificationFormComponent.vue b/resources/assets/vue/components/paymentsBilling/forms/PaymentVerificationFormComponent.vue index bb1df036..a60f6b14 100644 --- a/resources/assets/vue/components/paymentsBilling/forms/PaymentVerificationFormComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/forms/PaymentVerificationFormComponent.vue @@ -76,9 +76,14 @@ files: this.files }; this.submit(this.route('api.transaction.payment.verification.create', this.data.id), 'post', this.section, true, true) - } + }, + successHandler(response){ + this.closeModal(); + this.formHandler(); + window.location.reload(); + }, }, mixins: [ModalFromHandler] } - \ No newline at end of file +