🛠️ fix(profile): streamline payment logic in profile view for better readability and efficiency

This commit is contained in:
fsociety
2024-10-24 16:40:52 +02:00
parent f5d0e82f1a
commit 017892fa2a

View File

@@ -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) {