From 3404c1cfcbe1165d4440192b86d543ffb63509e0 Mon Sep 17 00:00:00 2001 From: fsociety Date: Sun, 27 Oct 2024 12:11:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20`style`(UI):=20format=20payment?= =?UTF-8?q?=20amount=20and=20improve=20association=20status=20label=20disp?= =?UTF-8?q?lay=20in=20PlebTable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/EinundzwanzigPlebTable.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Livewire/EinundzwanzigPlebTable.php b/app/Livewire/EinundzwanzigPlebTable.php index de5ef4a..2e43304 100644 --- a/app/Livewire/EinundzwanzigPlebTable.php +++ b/app/Livewire/EinundzwanzigPlebTable.php @@ -83,7 +83,12 @@ final class EinundzwanzigPlebTable extends PowerGridComponent 'payment', fn(EinundzwanzigPleb $model) => $model->paymentEvents->count() > 0 && $model->paymentEvents->first( - )->paid ? '' . $model->paymentEvents->first()->amount . '' : 'keine Zahlung vorhanden', + )->paid ? '' . number_format( + $model->paymentEvents->first()->amount, + 0, + ',', + '.', + ) . '' : 'keine Zahlung vorhanden', ) ->add( 'npub', @@ -103,7 +108,7 @@ final class EinundzwanzigPlebTable extends PowerGridComponent AssociationStatus::HONORARY => 'text-xs inline-flex font-medium rounded-full text-center px-2.5 py-1 bg-blue-500/20 text-blue-700', default => 'text-xs inline-flex font-medium rounded-full text-center px-2.5 py-1 text-red-700', }; - return '' . $model->association_status->label().''; + return '' . $model->association_status->label() . ''; }, ) ->add(