@extends('backend.master') @push('styles') {{-- Font Awesome 6 --}} @endpush @section('content')
Deposits
{{-- Mobile toggle --}} {{-- Filters --}}
@if(request()->hasAny(['status','q'])) Reset @endif
{{-- Flash messages --}} @if(session('ok'))
{{ session('ok') }}
@endif @if ($errors->any())
Validation error:
    @foreach ($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif {{-- Table --}}
@forelse($deposits as $d) @empty @endforelse
# User Amount Method Reference Status Requested Actions
#{{ $d->id }} {{ $d->user?->name }} @if($d->payer_phone || $d->user?->phone || $d->user?->email)
{{ $d->payer_phone ?? $d->user?->phone ?? $d->user?->email }}
@endif
{{ number_format($d->amount, 2) }} {{ $d->method?->name ?? 'Method' }} {{ $d->reference }} @php $badgeClass = match($d->status) { 'approved' => 'bg-success', 'rejected' => 'bg-danger', default => 'bg-warning text-dark' }; $icon = match($d->status) { 'approved' => 'fa-circle-check', 'rejected' => 'fa-circle-xmark', default => 'fa-hourglass-half' }; @endphp {{ ucfirst($d->status) }} {{ $d->created_at?->format('Y-m-d H:i') }} {{-- Details --}} {{-- Proof --}} @if($d->proof_path) Proof @endif @if($d->status === 'pending') @else Processed @endif
No deposits found.
{{ $deposits->links() }}
{{-- ===== Approve / Reject Modal ===== --}} {{-- ===== Details Modal ===== --}} @endsection @push('scripts') @php $depositDetailsPayload = []; foreach ($deposits as $dep) { $depositDetailsPayload[$dep->id] = [ 'id' => $dep->id, 'user_name' => optional($dep->user)->name, 'user_contact' => optional($dep->user)->phone ?? optional($dep->user)->email, 'method_name' => optional($dep->method)->name, 'payer_phone' => $dep->payer_phone, 'amount' => $dep->amount, 'reference' => $dep->reference, 'status' => $dep->status, 'proof_url' => $dep->proof_path ? asset('storage/'.$dep->proof_path) : null, 'admin_note' => $dep->admin_note, 'approved_at' => $dep->approved_at ? $dep->approved_at->format('Y-m-d H:i:s') : null, 'created_at' => $dep->created_at ? $dep->created_at->format('Y-m-d H:i:s') : null, 'updated_at' => $dep->updated_at ? $dep->updated_at->format('Y-m-d H:i:s') : null, ]; } @endphp @endpush