{{-- resources/views/admin/users/show.blade.php --}} @extends('admin.layouts.app') @section('title', $user->name) @section('page_title', $user->name) @section('breadcrumb') Users → {{ $user->name }} @endsection @section('content')
{{-- Left column --}}
{{-- Profile --}}
Profile {{ $user->is_active ? 'Active' : 'Inactive' }}
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}
{{ $user->email }}
@if($user->job_title)
{{ $user->job_title }}
@endif
@php $fields = [ 'Account Type' => str_replace('_', ' ', $user->account_type), 'Phone' => $user->phone, 'WhatsApp' => $user->whatsapp_number, 'Registered' => $user->created_at->format('d M Y H:i'), 'Last Login' => $user->last_login_at ?->format('d M Y H:i') ?? 'Never', 'Last Login IP' => $user->last_login_ip, 'Owner' => $user->is_property_owner ? 'Yes' : 'No', 'Utsanzi ID' => $user->utsanzi_user_id, ]; @endphp @foreach($fields as $label => $value)
{{ $label }}
{{ $value ?? '—' }}
@endforeach {{-- Email verification --}}
Email Verified
@if($user->email_verified_at)
{{ $user->email_verified_at->format('d M Y') }}
@else
Not verified
@endif
{{-- Property --}} @if($user->property)
{{ $user->property->name }}
{{ $user->property->city }} @if($user->property->country) , {{ $user->property->country }} @endif · {{ ucfirst(str_replace('_', ' ', $user->property->type)) }}
{{ str_replace('_', ' ', $user->property->verification_status) }} {{ $user->property->subscription_status }}
@endif {{-- Roles --}} @if($user->roles->count() > 0)
Roles
@foreach($user->roles as $role) {{ $role->name }} @endforeach
@endif {{-- Activity Log --}}
Recent Activity Last 20 events
@if($user->activityLogs->isEmpty())

No activity recorded yet

@else
@foreach($user->activityLogs as $log)
{{ $log->action }}
@if($log->module)
{{ $log->module }} @if($log->subject_type) · {{ class_basename($log->subject_type) }} @if($log->subject_id) #{{ $log->subject_id }} @endif @endif
@endif
{{ $log->occurred_at->diffForHumans() }}
@if($log->ip_address)
{{ $log->ip_address }}
@endif
@endforeach
@endif
{{-- Right column --}}
{{-- Actions --}}
Actions
@csrf @if($user->is_active) @else @endif
@if($user->property) View Property @endif
{{-- Quick Stats --}}
Stats
@php $stats = [ 'Activity events' => $user->activityLogs->count() . ' (last 20 shown)', 'Account type' => str_replace('_', ' ', $user->account_type), 'Property owner' => $user->is_property_owner ? 'Yes' : 'No', ]; @endphp @foreach($stats as $label => $value)
{{ $label }} {{ $value }}
@endforeach
{{-- Danger zone --}} @if(!$user->is_active)
Account Inactive
This user cannot log in. Activate their account to restore access.
@endif
@endsection