@extends('layouts.app', ['pageTitle' => 'User Finance Dashboard', 'pageSubtitle' => 'Submit claims, request advances and track approvals'])
@section('content')
<div class="grid grid-4"><div class="card stat"><div class="label">Total Claims</div><div class="value">{{ $summary['claims'] }}</div></div><div class="card stat"><div class="label">Pending Claims</div><div class="value">{{ $summary['pending_claims'] }}</div></div><div class="card stat"><div class="label">Paid Claims</div><div class="value">₦{{ number_format($summary['paid_claims'],2) }}</div></div><div class="card stat"><div class="label">Cash Advances</div><div class="value">{{ $summary['advances'] }}</div></div></div>
<div class="grid grid-2"><div class="card"><h3 class="section-title">Recent Claims</h3><div class="table-wrap"><table><thead><tr><th>No</th><th>Title</th><th>Amount</th><th>Status</th></tr></thead><tbody>@forelse($claims as $c)<tr><td>{{ $c->claim_number }}</td><td>{{ $c->title }}</td><td>₦{{ number_format($c->amount+$c->tax_amount,2) }}</td><td>{{ $c->status }}</td></tr>@empty<tr><td colspan="4">No claim submitted.</td></tr>@endforelse</tbody></table></div></div><div class="card"><h3 class="section-title">Recent Advances</h3><div class="table-wrap"><table><thead><tr><th>No</th><th>Amount</th><th>Needed</th><th>Status</th></tr></thead><tbody>@forelse($advances as $a)<tr><td>{{ $a->advance_number }}</td><td>₦{{ number_format($a->amount,2) }}</td><td>{{ $a->needed_date }}</td><td>{{ $a->status }}</td></tr>@empty<tr><td colspan="4">No advance requested.</td></tr>@endforelse</tbody></table></div></div></div>
@endsection
