From 017892fa2a9c2fd47dd8b4676c77ef938c201647 Mon Sep 17 00:00:00 2001 From: fsociety Date: Thu, 24 Oct 2024 16:40:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20fix(profile):=20streaml?= =?UTF-8?q?ine=20payment=20logic=20in=20profile=20view=20for=20better=20re?= =?UTF-8?q?adability=20and=20efficiency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/pages/association/profile.blade.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index 5123acd..9f81fb3 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -125,20 +125,16 @@ $listenForPayment = function () { if ($response->json()['status'] === 'Settled') { $paymentEvent->paid = true; $paymentEvent->save(); - $this->payments = $this->currentPleb - ->paymentEvents() - ->where('paid', true) - ->get(); $this->currentYearIsPaid = true; } } if ($paymentEvent->paid) { $this->currentYearIsPaid = true; - $this->payments = $this->currentPleb - ->paymentEvents() - ->where('paid', true) - ->get(); } + $this->payments = $this->currentPleb + ->paymentEvents() + ->where('paid', true) + ->get(); }; $save = function ($type) {