{{-- resources/views/admin/financial/wallets/show.blade.php --}} @extends('admin.layouts.app') @section('title', 'Wallet Details') @section('page-title', 'Savings Wallet Details') @php $breadcrumbs = [ ['title' => 'Wallets', 'url' => route('admin.wallets.index')], ['title' => is_array($wallet->name) ? ($wallet->name['en'] ?? 'Wallet') : $wallet->name] ]; @endphp @section('content')
{{ is_array($wallet->name) ? ($wallet->name['en'] ?? 'Wallet') : $wallet->name }}
@if($wallet->admin_flagged) Flagged @else Active @endif
Owner:
@if($wallet->user) {{ $wallet->user->name }} @else No User @endif
Trip:
@if($wallet->trip) {{ $wallet->trip->title }} @else No trip @endif
Target Amount: {{ format_currency($wallet->target_amount, $wallet->currency) }}
Current Amount: {{ format_currency($wallet->current_amount, $wallet->currency) }}
Currency: {{ $wallet->currency }}
Target Date: {{ $wallet->target_date ? format_admin_date($wallet->target_date, 'M j, Y') : 'Not set' }}
Frequency: {{ ucfirst($wallet->contribution_frequency) }}
Created: {{ format_admin_date($wallet->created_at) }}
@if($wallet->admin_notes)

Admin Notes:

{{ $wallet->admin_notes }}

@endif
Recent Transactions
{{ $wallet->transactions->count() }} total transactions
@if($wallet->transactions->count() > 0)
@foreach($wallet->transactions->sortByDesc('created_at')->take(10) as $transaction) @endforeach
Reference Type Amount Status Method Date
{{ $transaction->transaction_reference ?? 'TXN-' . $transaction->id }} {{ ucfirst($transaction->type) }} {{ format_currency($transaction->amount, $wallet->currency) }} {{ ucfirst($transaction->status) }} {{ $transaction->payment_method ? ucfirst(str_replace('_', ' ', $transaction->payment_method)) : 'N/A' }} {{ format_admin_date($transaction->created_at, 'M j, Y') }}
@if($wallet->transactions->count() > 10) @endif @else

No transactions yet

@endif
Activity History
@if($activities->count() > 0)
@foreach($activities as $activity)
@if($activity->user) {{ $activity->user->initials }} @else @endif

{{ ucwords(str_replace('_', ' ', $activity->action)) }} @if($activity->user) by {{ $activity->user->name }} @else by System @endif

@if($activity->changes)

@if(is_array($activity->changes)) Changes: {{ implode(', ', array_keys($activity->changes)) }} @else Additional details available @endif

@endif

{{ $activity->created_at->diffForHumans() }}

@endforeach
@else

No activity history

@endif
Back to Wallets
@if($wallet->user) View User @endif @if($wallet->trip) View Trip @endif
@endsection @push('scripts') @endpush