@extends('layouts.portal') @section('title', 'Withdrawals') @section('portal_title', 'Withdrawal Requests') @section('portal_subtitle', 'Request wallet withdrawals and track admin payment approval.') @section('portal_content') @php $balance = (float) ($wallet['balance'] ?? 0); $availableBalance = (float) ($wallet['available_balance'] ?? $balance); $pendingWithdrawals = (float) ($wallet['pending_withdrawals'] ?? 0); $withdrawals = $wallet['withdrawals'] ?? []; @endphp

Withdrawal Balance

${{ number_format($availableBalance, 2) }}

Wallet Balance

${{ number_format($balance, 2) }}

Pending Withdrawals

${{ number_format($pendingWithdrawals, 2) }}

Place Withdrawal

@csrf
@error('amount')

{{ $message }}

@enderror
@error('withdrawal_method')

{{ $message }}

@enderror
@error('account_details')

{{ $message }}

@enderror

Withdrawal History

Date Method Status Amount
@forelse ($withdrawals as $withdrawal) @php $status = $withdrawal['status'] ?? 'Pending Withdrawal Review'; $statusClass = match ($status) { 'Withdrawal Paid' => 'bg-emerald-50 text-emerald-700', 'Withdrawal Rejected' => 'bg-red-50 text-red-700', default => 'bg-amber-50 text-amber-700', }; @endphp
{{ $withdrawal['submitted_at'] ?? '-' }} {{ $withdrawal['withdrawal_method'] ?? 'Not selected' }} {{ $status }} ${{ number_format((float) ($withdrawal['amount'] ?? 0), 2) }}
@empty
- No withdrawal yet Pending $0.00
@endforelse
@endsection