<x-app-layout><x-slot name="header"><div class="flex items-center justify-between"><div><h1 class="text-2xl font-bold">Payouts</h1><p class="text-sm text-slate-500">Schedule and track member collections.</p></div><a href="{{ route('payouts.create') }}" class="rounded-xl bg-emerald-600 px-4 py-2 text-sm font-semibold text-white">Schedule payout</a></div></x-slot><div class="mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8">@if(session('status'))<div class="mb-4 rounded-xl bg-emerald-50 p-3 text-sm text-emerald-700">{{ session('status') }}</div>@endif<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900"><div class="overflow-x-auto"><table class="w-full text-left text-sm"><thead class="bg-slate-50 text-xs uppercase text-slate-500 dark:bg-slate-800"><tr><th class="p-4">Member</th><th class="p-4">Group</th><th class="p-4">Amount</th><th class="p-4">Scheduled</th><th class="p-4">Status</th><th></th></tr></thead><tbody class="divide-y divide-slate-100 dark:divide-slate-800">@forelse($payouts as $payout)<tr><td class="p-4 font-medium">{{ $payout->member->full_name }}</td><td class="p-4">{{ $payout->group->name }}</td><td class="p-4">₦{{ number_format($payout->amount/100,2) }}</td><td class="p-4">{{ $payout->scheduled_date->format('d M Y') }}</td><td class="p-4"><span class="rounded-full bg-amber-50 px-2 py-1 text-xs capitalize text-amber-700">{{ $payout->status }}</span></td><td class="p-4 text-right"><a href="{{ route('payouts.edit',$payout) }}" class="text-emerald-600">Edit</a></td></tr>@empty<tr><td colspan="6" class="p-12 text-center text-slate-500">No payouts scheduled.</td></tr>@endforelse</tbody></table></div></div><div class="mt-4">{{ $payouts->links() }}</div></div></x-app-layout>
