@php $sortIcon = function (string $col) use ($sort, $direction): string { if ($sort !== $col) return 'fa-light fa-arrows-up-down'; return $direction === 'asc' ? 'fa-solid fa-caret-up' : 'fa-solid fa-caret-down'; }; $busy = 'search,setStatus,sortBy,gotoPage,previousPage,nextPage,goTo'; @endphp
@if ($error)
Donations are temporarily unavailable
{{ $error }}
@else {{-- Date-range selector — drives both the KPIs and the table (default Today). A search overrides it and covers all dates. --}}
Period @foreach (['today' => 'Today', '7days' => '7 days', '30days' => '30 days', 'year' => 'This year', 'all' => 'All'] as $key => $label) @endforeach @if ($searching) Search covers all dates @endif
{{-- KPI strip --}}
€{{ number_format($kpi['raised'], 0) }}Raised
{{ number_format($kpi['count']) }}Donations
€{{ number_format($kpi['average'], 0) }}Average gift
{{ number_format($kpi['refunded']) }}Refunded
@unless ($searching)

@if ($kpiComputedAt) Updated {{ $kpiComputedAt->diffForHumans() }} @else Updating… @endif

@endunless @foreach (['' => 'All', 'passed' => 'Passed', 'refunded' => 'Refunded'] as $key => $label) @endforeach {{ number_format($donations->total()) }} result{{ $donations->total() === 1 ? '' : 's' }}
@forelse ($donations as $d) @php $anon = (int) $d->anon === 1; $refunded = (bool) $d->refunded; @endphp @empty @endforelse @for ($i = 0; $i < 8; $i++) @endfor
Donor Fundraiser Amount Date Visibility Status
{{ trim((string) $d->d_name) ?: '—' }}
{{ $d->d_email ?: ($d->d_ident ?: '#'.$d->id) }}
{{ trim((string) $d->d_desc) ?: '—' }}
{{ $d->u_ident }}
€{{ number_format((float) $d->d_amount, 0) }} {{ $d->d_date?->format('d M Y') ?: '—' }} @if ($anon) Anon @else Public @endif @if ($refunded) Refunded @else {{ $d->d_status ?: 'PASSED' }} @endif
No donations match
Nothing matches your search. @if ($status)@endif
@if ($donations->hasPages())
Showing {{ $donations->firstItem() }}–{{ $donations->lastItem() }} of {{ number_format($donations->total()) }}
@endif
@endif