@extends('layouts.app') @section('title', 'User — ' . $user->name) @section('content')
{{-- User Profile --}}
@if($user->avatar) @else
{{ strtoupper(substr($user->name,0,2)) }}
@endif
{{ $user->name }}
@if($user->isKycApproved()) ✓ KYC Verified · @endif @if($user->isPremium()) ⭐ Premium · @endif Joined {{ $user->created_at->format('M Y') }}
{{ $user->email }}
{{ $user->phone ?? 'Not provided' }}
{{ $user->city ?? '' }}{{ $user->state ? ', '.$user->state : 'Not set' }}
{{ $user->streak_days }} day streak
{{-- Wallet Stats --}}
Wallet
@foreach([ ['Balance', number_format($user->getCoins()).' NC', 'var(--gl)'], ['Value', '₦'.number_format($user->getCoins()*10), '#60a5fa'], ['Pickups', $user->wasteLogs->where('status','confirmed')->count(), '#fbbf24'], ['CO₂ Saved', $user->getCo2Saved().' kg', '#34d399'], ] as [$l,$v,$c])
{{ $v }}
{{ $l }}
@endforeach
{{-- Active Chat --}} @if($chat)
Active Support Chat

{{ $chat->subject ?? 'Support Chat' }} · {{ $chat->last_message_at?->diffForHumans() }}

Reply to Chat
@endif
{{-- Activity --}}
{{-- Recent Pickups --}}
Recent Pickups
@forelse($recentPickups as $log)
{{ ucfirst($log->waste_category) }}
{{ $log->address ?? '—' }}
{{ $log->statusLabel() }} @if($log->coins_earned > 0)
+{{ $log->coins_earned }} NC
@endif
@empty

No pickups yet.

@endforelse
{{-- Recent Transactions --}}
Recent Transactions
@forelse($recentTxns as $t) @php $isEarn = $t->type === 'earn'; @endphp
{{ Str::limit($t->description, 40) }}
{{ $t->created_at->format('d M Y, H:i') }}
{{ $isEarn?'+':'-' }}{{ $t->coins }} NC
@empty

No transactions yet.

@endforelse
@endsection