Integrate Flux modals for member acceptance and rejection actions, refactor related Livewire methods, and improve Blade table structure for consistency and UX.

This commit is contained in:
HolgerHatGarKeineNode
2026-01-18 23:28:27 +01:00
parent 6edcf014a6
commit bf31b9f001
3 changed files with 102 additions and 91 deletions

View File

@@ -1,58 +1,41 @@
<div class="p-4">
@if($row->application_text )
<div class="px-4 py-2 rounded-lg text-sm bg-violet-100 text-gray-700">
<div class="flex w-full justify-between items-start">
<div class="flex">
<svg class="shrink-0 fill-current text-violet-500 mt-[3px] mr-3" width="16" height="16"
viewBox="0 0 16 16">
<path
d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm1 12H7V7h2v5zM8 6c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1z"></path>
</svg>
<div>{{ $row->application_text }}</div>
</div>
</div>
</div>
<flux:callout icon="information-circle" variant="info">
{{ $row->application_text }}
</flux:callout>
@endif
<section>
<h3 class="text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1">
bisherige Zahlungen</h3>
<!-- Table -->
<table class="table-auto w-full dark:text-gray-400">
<!-- Table header -->
<thead
class="text-xs uppercase text-gray-400 dark:text-gray-500">
<tr class="flex flex-wrap md:table-row md:flex-no-wrap">
<th class="w-full block md:w-auto md:table-cell py-2">
<div class="font-semibold text-left">Satoshis</div>
</th>
<th class="w-full hidden md:w-auto md:table-cell py-2">
<div class="font-semibold text-left">Jahr</div>
</th>
<th class="w-full hidden md:w-auto md:table-cell py-2">
<div class="font-semibold text-left">Event-ID</div>
</th>
</tr>
</thead>
<!-- Table body -->
<tbody class="text-sm">
@foreach($row->paymentEvents as $payment)
<tr class="flex flex-wrap md:table-row md:flex-no-wrap border-b border-gray-200 dark:border-gray-700/60 py-2 md:py-0">
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
<div
class="text-left font-medium text-gray-800 dark:text-gray-100">{{ $payment->amount }}</div>
</td>
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
<div
class="text-left">{{ $payment->year }}</div>
</td>
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
<div
class="text-left font-medium">{{ $payment->event_id }}</div>
</td>
<flux:heading size="lg" class="mb-4">bisherige Zahlungen</flux:heading>
<table class="table-auto w-full">
<thead class="text-xs font-semibold uppercase border-b">
<tr>
<th class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap text-left">
<div class="font-semibold">Satoshis</div>
</th>
<th class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap text-left">
<div class="font-semibold">Jahr</div>
</th>
<th class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap text-left">
<div class="font-semibold">Event-ID</div>
</th>
</tr>
@endforeach
</thead>
<tbody class="text-sm divide-y">
@foreach($row->payment_events as $payment)
<tr>
<td class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap">
<div class="font-medium">{{ $payment->amount }}</div>
</td>
<td class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap">
<div>{{ $payment->year }}</div>
</td>
<td class="px-2 first:pl-5 last:pr-5 py-3 whitespace-nowrap">
<div class="font-medium">{{ $payment->event_id }}</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</section>

View File

@@ -86,4 +86,40 @@ new class extends Component {
</flux:callout>
</div>
@endif
<flux:modal name="confirm-accept-pleb" class="min-w-88">
<div class="space-y-6">
<div>
<flux:heading size="lg">Mitglied akzeptieren</flux:heading>
<flux:subheading class="mt-2">
Bist du sicher, dass du dieses Mitglied akzeptieren möchtest?
</flux:subheading>
</div>
<div class="flex gap-2">
<flux:spacer/>
<flux:modal.close>
<flux:button variant="ghost">Abbrechen</flux:button>
</flux:modal.close>
<flux:button wire:click="acceptPleb" variant="primary">Ja, akzeptieren</flux:button>
</div>
</div>
</flux:modal>
<flux:modal name="confirm-delete-pleb" class="min-w-88">
<div class="space-y-6">
<div>
<flux:heading size="lg">Bewerbung ablehnen</flux:heading>
<flux:subheading class="mt-2">
Bist du sicher, dass du diese Bewerbung ablehnen möchtest?
</flux:subheading>
</div>
<div class="flex gap-2">
<flux:spacer/>
<flux:modal.close>
<flux:button variant="ghost">Abbrechen</flux:button>
</flux:modal.close>
<flux:button wire:click="deletePleb" variant="danger">Ja, ablehnen</flux:button>
</div>
</div>
</flux:modal>
</div>