@extends('layouts.admin') @section('title', 'User Details') @section('page-title', 'User Details') @section('page-subtitle', 'View and manage user account information') @section('content')
{{ strtoupper(substr($user->username, 0, 1)) }}

{{ $user->username }}

{{ $user->email }}

{{ $levels->find($user->level)?->name ?? "Level {$user->level}" }} {{ ucfirst($user->status) }} @if($user->is_organizer) 🛡️ Admin @endif @if($user->role !== 'basic_user') {{ $user->role->getDisplayName() }} @endif
₦{{ number_format($user->wallet_balance, 2) }}
Wallet Balance
@if($user->locked_balance > 0)
₦{{ number_format($user->locked_balance, 2) }} locked
@endif
{{ number_format($user->xp) }}
Experience Points
{{ $user->games_played ?? 0 }}
Games Played
{{ $user->createdChallenges->count() + $user->acceptedChallenges->count() }}
Total Challenges
{{ $user->walletTransactions->count() }}
Transactions

🎯 Level Assignment

Select a level to assign to this user. Higher levels unlock more features and higher wager limits.

@csrf
Current Level Info:
{{ $levels->find($user->level)?->name ?? "Level {$user->level}" }}
@php $currentLevel = $levels->find($user->level); @endphp @if($currentLevel) Min XP: {{ number_format($currentLevel->min_xp) }}
Min Games: {{ $currentLevel->min_games_played }}
@if($currentLevel->max_wager_amount) Max Wager: ₦{{ number_format($currentLevel->max_wager_amount) }} @else Max Wager: Unlimited @endif @endif

💰 Wallet Management

@csrf
@csrf

👑 Role & Status Management

@csrf

{{ $user->role->getDescription() }}

@csrf

⚡ Quick Actions

@if($user->status === 'active')
@csrf
@else
@csrf
@endif
@csrf

📊 User Activity Log

@forelse($recentActivity as $activity)
{{ $activity['type'] === 'challenge' ? '⚔️' : '💰' }}
{{ $activity['description'] }}
{{ $activity['created_at']->diffForHumans() }}
@if($activity['amount'])
{{ $activity['amount'] > 0 ? '+' : '' }}₦{{ number_format(abs($activity['amount']), 2) }}
@endif
{{ $activity['action'] }}
@empty
📊

No recent activity found

@endforelse
@endsection