@extends('layouts.app') @section('title', $pageTitle ?? 'My Transactions') @push('styles') @endpush @section('content') {{-- Page Title --}}

{{ $pageTitle ?? 'My Transactions' }}

Create New
{{-- Status Tabs --}} @php $currentStatus = $currentStatus ?? request('status'); @endphp
All {{ $statusCounts['all'] ?? 0 }} Active {{ $statusCounts['active'] ?? 0 }} Pending {{ $statusCounts['pending'] ?? 0 }} Completed {{ $statusCounts['completed'] ?? 0 }} Disputed {{ $statusCounts['disputed'] ?? 0 }} Cancelled {{ $statusCounts['cancelled'] ?? 0 }}
{{-- Filter Bar --}}
{{-- Transactions Table --}}
@if(isset($transactions) && $transactions->count()) @foreach($transactions as $txn) @endforeach
ID Title Role Counterparty Amount Status Created Action
ESC-{{ str_pad($txn->id, 5, '0', STR_PAD_LEFT) }} {{ Str::limit($txn->title, 35) }} {{ $txn->buyer_id === auth()->id() ? 'Buyer' : 'Seller' }} {{ $txn->getCounterparty(auth()->id())?->name ?? 'N/A' }} {{ $currency ?? '₦' }}{{ number_format($txn->amount, 2) }} {{ ucfirst($txn->status) }} {{ $txn->created_at->format('M d, Y') }} View
@include('partials.table-pagination', ['paginator' => $transactions, 'label' => 'transactions']) @else

No transactions found

{{ request()->hasAny(['status', 'search', 'date_from', 'date_to']) ? 'Try adjusting your filters.' : 'Create your first escrow transaction to get started.' }}

@unless(request()->hasAny(['status', 'search', 'date_from', 'date_to'])) Create Escrow @endunless
@endif
@endsection