@extends('layouts.vendor') @section('page-title', 'Dashboard') @section('vendor-content')
@php $hour = now()->format('H'); if ($hour < 12) { $greeting = 'Good Morning'; } elseif ($hour < 17) { $greeting = 'Good Afternoon'; } else { $greeting = 'Good Evening'; } @endphp

{{ $greeting }}, {{ Auth::user()->business_name }}

Welcome back
@if ($kycWarning) @endif
Wallet Number

{{ $walletnumber ?? 'N/A' }}

Wallet Balance

₦{{ number_format($walletbalance, 2) }}

Pending Payouts

₦{{ number_format($pendingPayments, 2) }}

Total Payouts

₦{{ number_format($totalPayouts, 2) }}

Category Report
Transaction Report
Recent Transactions
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@forelse ($recentTransactions as $transaction) {{-- Handle both array and object transactions --}} @empty @endforelse
Category Description Type Amount Date
{{ is_array($transaction) ? $transaction['transaction_category'] : $transaction->transaction_category }} {{ is_array($transaction) ? $transaction['description'] : $transaction->description }} {{ strtoupper(is_array($transaction) ? $transaction['type'] : $transaction->type) }} ₦{{ number_format(is_array($transaction) ? $transaction['amount'] : $transaction->amount, 2) }} {{ \Carbon\Carbon::parse(is_array($transaction) ? $transaction['created_at'] : $transaction->created_at)->format('d/m/Y H:i') }}
No transactions found
@if($recentTransactions->hasPages())

Showing {{ $recentTransactions->firstItem() }} to {{ $recentTransactions->lastItem() }} of {{ $recentTransactions->total() }} results

{{ $recentTransactions->links() }}
@endif
@push('scripts') @endpush @endsection