@extends('layouts.admin') @section('title', 'Wallet Withdrawals') @push('styles') @endpush @section('content') @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@forelse($withdrawals as $w) @php $user = $w->wallet->user ?? null; $isPending = str_contains((string) $w->description, 'pending admin approval'); $isApproved = str_contains((string) $w->description, 'approved'); $isRejected = str_contains((string) $w->description, 'rejected'); @endphp @if ($isPending) @endif @empty @endforelse
ID User Amount Bank Status / Description Requested Actions
#{{ $w->id }}
{{ $user->name ?? 'Unknown' }}
{{ $user->email ?? '—' }}
₦{{ number_format((float) $w->amount, 2) }}
{{ \Illuminate\Support\Str::limit((string) $w->description, 50) }}
@if ($isPending) Pending @elseif ($isApproved) Approved @elseif ($isRejected) Rejected @else @endif @if ($w->reference_id)
{{ $w->reference_id }}
@endif
{{ $w->created_at?->format('M d, Y g:i A') }} @if ($isPending)
@csrf
@elseif ($isApproved)
@csrf
@endif
No {{ $status }} withdrawals.
@if ($withdrawals->hasPages())
{{ $withdrawals->links() }}
@endif
@endsection