@extends('layouts.app') @section('content')
@if(auth()->user()->hasRole(['superadmin', 'system_admin'])) Back to Users @else
@endif
{{ strtoupper(substr($user->name, 0, 2)) }} @if($user->status === 'active') @endif

{{ $user->name }}

{{ $user->designation }}

{{ $user->branch->name ?? 'N/A' }}, {{ $user->region->name ?? 'N/A' }}

  • Email {{ $user->email }}
  • Phone {{ $user->phone_number }}
  • Rank {{ $user->rank->name ?? 'N/A' }}
  • Status {{ ucfirst($user->status) }}
  • Role @if($user->getRoleNames()->isNotEmpty()) @foreach($user->getRoleNames() as $role) {{ $role }} @endforeach @else No roles @endif
{{ $user->created_at->format('M Y') }}
Member Since
{{ $user->login_attempts }}
Login Attempts
Location & Organization
  • Branch {{ $user->branch->name ?? 'N/A' }}
  • Region {{ $user->region->name ?? 'N/A' }}
  • Department {{ $user->department->name ?? 'N/A' }}
  • District {{ $user->district->name ?? 'N/A' }}
  • Command {{ $user->command->name ?? 'N/A' }}
Access History & Security
First Login
{{ $user->first_login ? $user->first_login : 'Never logged in' }}
Last Login
@if($user->last_login) {{ $user->last_login->format('Y-m-d H:i:s') }} ({{ $user->last_login->diffForHumans() }}) @else Never logged in @endif
Last Password Change
@if($user->last_password_change) {{ $user->last_password_change->format('Y-m-d H:i:s') }} ({{ $user->last_password_change->diffForHumans() }}) @else Never changed @endif
Failed Login Attempts
{{ $user->login_attempts }} attempts
@if($totalEnquiries > 0)
Enquiry Statistics
{{ $totalEnquiries }}
Total Enquiries
@if($lastEnquiry) {{ $lastEnquiry->created_at->format('d M Y') }} @else No enquiries @endif
Last Enquiry @if($lastEnquiry)
{{ ucwords(str_replace('_', ' ', $lastEnquiry->type)) }} {{ ucfirst($lastEnquiry->status) }} @endif
Enquiry Distribution
Enquiry Breakdown
    @foreach($enquiriesByType as $type)
  • {{ $type['type'] }} {{ $type['count'] }}
  • @endforeach
@endif @if(auth()->user()->hasRole(['superadmin', 'system_admin'])) @endif
@endsection