@extends('layouts.vpm-dashboard', ['active' => 'card-applications', 'area' => 'admin']) @section('title', 'Card applications') @section('page_title', 'Card applications') @section('page_subtitle', 'Approve or reject debit card applications') @section('content')
Manage tiers Withdrawals

Pending

@if ($pending->isEmpty())

No pending applications.

@else @include('partials.vpm.data-table', [ 'columns' => [ ['key' => 'client', 'label' => 'Client'], ['key' => 'tier', 'label' => 'Tier'], ['key' => 'fee', 'label' => 'Issuance fee', 'align' => 'num'], ['key' => 'balance', 'label' => 'Account balance', 'align' => 'num'], ['key' => 'date', 'label' => 'Submitted', 'type' => 'date'], ['key' => 'action', 'label' => '', 'html' => true], ], 'rows' => $pending->map(function ($app) { $approve = '
'.csrf_field() .'
'; $reject = '
'.csrf_field() .'
'; return [ 'client' => $app->user->name, 'tier' => $app->tier->name, 'fee' => '$'.number_format((float) $app->issuance_fee, 2), 'balance' => number_format((float) $app->user->balance, 2), 'date' => $app->created_at->format('M j, Y H:i'), 'action' => $approve.$reject, ]; })->all(), ]) @endif

Recent decisions

@if ($recent->isEmpty())

No processed applications yet.

@else @include('partials.vpm.data-table', [ 'columns' => [ ['key' => 'client', 'label' => 'Client'], ['key' => 'tier', 'label' => 'Tier'], ['key' => 'status', 'label' => 'Status', 'type' => 'status'], ['key' => 'date', 'label' => 'Reviewed', 'type' => 'date'], ], 'rows' => $recent->map(fn ($app) => [ 'client' => $app->user->name, 'tier' => $app->tier->name, 'status' => $app->statusLabel(), 'date' => $app->reviewed_at?->format('M j, Y H:i') ?? '-', ])->all(), ]) @endif
@endsection