@php $status = $withdrawal->status; $steps = ['pending' => 'Requested', 'approved' => 'Approved', 'processing' => 'Processing', 'paid' => 'Paid']; $stepKeys = array_keys($steps); $currentStep = array_search($status, $stepKeys, true); $isTerminalFailure = in_array($status, ['rejected', 'failed'], true); @endphp
@if ($actionError) {{ $actionError }} @endif
@if (auth('staff')->user()->hasPermission('users.view')) {{ $withdrawal->user->username }} @else {{ $withdrawal->user->username }} @endif {{ $withdrawal->amount }} {{ $withdrawal->upi_id }} {{ $withdrawal->created_at->format('d M Y, H:i') }} @if ($withdrawal->reviewed_at) {{ $withdrawal->reviewed_at->format('d M Y, H:i') }} @if ($withdrawal->reviewedByStaff)by {{ $withdrawal->reviewedByStaff->display_name }}@endif @endif @if ($withdrawal->settled_at) {{ $withdrawal->settled_at->format('d M Y, H:i') }} @if ($withdrawal->settledByStaff)by {{ $withdrawal->settledByStaff->display_name }}@endif @endif
@if ($withdrawal->rejection_reason) {{ $withdrawal->rejection_reason }} @endif @if ($withdrawal->failure_reason) {{ $withdrawal->failure_reason }} @endif @if ($withdrawal->settlement_reference) Reference {{ $withdrawal->settlement_reference }} @endif
@if ($isTerminalFailure)

This request ended as {{ $status }}; the reserved amount was returned to the player's winnings.

@else
    @foreach ($steps as $key => $label) @php($index = array_search($key, $stepKeys, true))
  1. $index <= $currentStep, 'bg-surface-3' => $index > $currentStep])>

    $index <= $currentStep, 'text-fg-3' => $index > $currentStep])> {{ $label }} @if ($index === $currentStep)(current)@endif

  2. @endforeach
@endif
@if ($status === 'pending') Approve @endif @if ($status === 'approved') Mark as processing @endif @if ($status === 'processing')
Mark as paid
Mark as failed
@endif @if (in_array($status, ['pending', 'approved']))
Reject
@endif @if (! in_array($status, ['pending', 'approved', 'processing']))

This request is {{ $status }} and can't be changed. Every step is recorded in the audit log.

@endif