From 5dd2df02fd656874393790dc6d0b14602f36ca42 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 9 Mar 2024 01:22:13 +0800 Subject: [PATCH] Hide 'Make Payment' button when there is a group payment pending verification from Admin --- ...stomerPaymentsBillingWithStorageComponent.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue index 4c8c9538..6b00a3c3 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/CustomerPaymentsBillingWithStorageComponent.vue @@ -277,7 +277,7 @@
MYR {{(Math.round((totalOutstanding + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
-
+
Make Payment
@@ -345,6 +345,20 @@ }); return ids; }, + groupPaymentPending(){ + if (Array.isArray(this.items)) { + for (let i = 0; i < this.items.length; i++) { + for (let j = 0; j < this.items[i].groups_payment_history.length; j++) { + const item = this.items[i].groups_payment_history[j]; + // console.log('item', JSON.stringify(item)); + if (item.payment_transaction && item.payment_transaction.status === 1) { + return true; + } + } + } + } + return false; + } }, methods: { getLatestComment(item) {