@extends('layouts.admin.base') @section('page-title') Manage {{ $user->name }}'s Wallets @endsection @section('content')

{{ $user->name }}

{{ $user->email }}

@foreach($wallets as $wallet)
{{ $wallet->name() }} Wallet

{{ formatMoney($wallet->balance) }}

@if($walletBalances[$wallet->id]['mismatch'])
Expected: {{ formatMoney($walletBalances[$wallet->id]['expected']) }}
@else
Balance matches transactions
@endif
@endforeach
Wallet Transactions
@foreach($wallets as $index => $wallet)
@forelse($wallet->transactions()->orderBy('created_at', 'DESC')->get() as $transaction) @empty @endforelse
Date Amount Type Description Status Actions
{{ formatDateTime($transaction->created_at) }} {{ formatMoney($transaction->amount) }} {{ $transaction->type == 1 ? 'Credit' : 'Debit' }} {{ $transaction->description }} {{ $transaction->status == 1 ? 'Approved' : 'Pending' }}
No transactions found
@endforeach
Change Log
@forelse($actionLogs as $log) @empty @endforelse
Date Admin Action Table Old Value New Value
{{ formatDateTime($log->created_at) }} {{ $log->admin->name ?? 'N/A' }} {{ $log->action_type_display }} {{ $log->target_table }} {{ $log->old_value ? json_encode(json_decode($log->old_value), JSON_PRETTY_PRINT) : 'N/A' }} {{ $log->new_value ? json_encode(json_decode($log->new_value), JSON_PRETTY_PRINT) : 'N/A' }}
No change logs found
{{ $actionLogs->links() }}
@endsection