From 5eb830769138e8f443e1bd1fdef50db98dfb2dc3 Mon Sep 17 00:00:00 2001 From: fsociety Date: Mon, 30 Sep 2024 15:51:29 +0200 Subject: [PATCH] feat: update payment event handling in profile view Updated the way payment events are handled in the profile view. Now, the first payment event id is retrieved directly from the paymentEvents relationship instead of the payment_event attribute. Also, instead of refreshing the currentPleb model after creating a payment event, it is now loaded with the paymentEvents relationship. --- resources/views/pages/association/profile.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index 3e25b7f..dc8e037 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -62,7 +62,7 @@ on([ } if ($this->currentPleb->paymentEvents->count() < 1) { $this->createPaymentEvent(); - $this->currentPleb->refresh(); + $this->currentPleb->load('paymentEvents'); } $this->loadEvents(); $this->searchPaymentEvent(); @@ -446,7 +446,7 @@ $loadEvents = function () {

Nostr Event für die Zahlung des - Mitgliedsbeitrags: {{ $currentPleb->payment_event }}

+ Mitgliedsbeitrags: {{ $currentPleb->paymentEvents->first()->event_id }}

@if(isset($events[0]))

{{ $events[0]['content'] }}