@extends('layouts.admin') @section('title', $user->name . ' — User Detail') @section('page-title', 'User Detail') @section('content') {{-- ── Action Buttons ────────────────────────────────────────────── --}}
Back to Users
Edit User
{{-- ── Header Card ─────────────────────────────────────────── --}}
{{-- Profile Photo --}}
@if($user->profile_photo) Profile Photo @else @endif
{{-- Basic Info --}}

{{ $user->name }}

{{ $user->email }}

Role: {{ $user->role->name ?? 'No Role' }} Status: @if($user->status === 'active') {{ ucfirst($user->status) }} @elseif($user->status === 'inactive') {{ ucfirst($user->status) }} @else {{ ucfirst($user->status ?? 'Not Available') }} @endif Joined: {{ $user->created_at ? $user->created_at->format('d M Y') : 'Not Available' }}
{{-- ── Left Column: Account & Contact Info ─────────────────────────────────────────── --}}
{{-- Account Information Card --}}
Account Information
Full Name
{{ $user->name }}

Email Address
{{ $user->email }}

Company Name
{{ $user->company_name ?? 'Not Available' }}

Position / Jabatan
{{ $user->position ?? 'Not Available' }}

Role
{{ $user->role->name ?? 'Not Available' }}

Account Status
@if($user->status === 'active') {{ ucfirst($user->status) }} @elseif($user->status === 'inactive') {{ ucfirst($user->status) }} @else {{ ucfirst($user->status ?? 'Not Available') }} @endif

Email Verified
@if($user->email_verified_at) {{ $user->email_verified_at->format('d M Y, H:i') }} @else Not Verified @endif

Registration Date
{{ $user->created_at ? $user->created_at->format('d M Y, H:i') : 'Not Available' }}

Last Login
{{ $user->last_login_at ? $user->last_login_at->format('d M Y, H:i') : 'Never' }}

User ID
#{{ $user->id }}
{{-- Contact Information Card --}}
Contact Information

Phone Number
{{ $user->phone ?? 'Not Available' }}

Country
@if($user->country) @if($user->country->flag_url) Flag @endif {{ $user->country->name }} @else Not Available @endif

City
Not Available

Address
Not Available
{{-- ── Right Column: Activity Info ─────────────────────────────────────────── --}}
Activity Information
Total Logins
@php $loginCount = class_exists(\App\Models\ActivityLog::class) ? \App\Models\ActivityLog::where('user_id', $user->id)->where('action', 'login')->count() : 'Not Available'; @endphp
{{ $loginCount }}
Last Login
{{ $user->last_login_at ? $user->last_login_at->format('d M Y, H:i') : 'Never' }}
Account Created
{{ $user->created_at ? $user->created_at->format('d M Y, H:i') : 'Not Available' }}
Last Updated
{{ $user->updated_at ? $user->updated_at->format('d M Y, H:i') : 'Not Available' }}
@endsection