@extends('layouts.app') @section('title', $user->name . ' โ€” User Profile & Permissions') @section('header', 'User Profile') @section('content')
โ† Back to Users Directory
@if(session('success'))
โœ“ {{ session('success') }}
@endif @if(session('error'))
โœ• {{ session('error') }}
@endif
{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

@php $roleSlug = strtolower($user->role); $badgeClass = match($roleSlug) { 'super-admin', 'admin' => 'badge-admin', 'manager' => 'badge-manager', 'sales' => 'badge-sales', 'telecaller' => 'badge-telecaller', 'support' => 'badge-support', 'finance' => 'badge-finance', 'marketing' => 'badge-marketing', default => 'badge-custom' }; @endphp {{ $user->roleModel?->name ?? ucfirst($user->role) }} @if($user->is_locked) ๐Ÿ”’ Locked @elseif($user->active) โœ“ Active @else โŠ˜ Inactive @endif

{{ $user->designation ?: 'Staff' }} ยท ๐Ÿข {{ $user->department ?: 'Operations' }} ยท ๐Ÿ“ {{ $user->branch_location ?: 'HQ' }} ยท ๐Ÿ†” {{ $user->employee_id ?? 'EMP-#'.$user->id }}

โœ๏ธ Edit User
@csrf @method('PATCH')
@csrf @method('PATCH')

Organizational Hierarchy

Department {{ $user->department ?: 'Operations' }}
Designation {{ $user->designation ?: 'Staff' }}
Reporting Manager @if($user->manager) {{ $user->manager->name }} ({{ $user->manager->designation }}) @else Top Level / Self-Managed @endif
Branch / Location {{ $user->branch_location ?: 'HQ' }}
Date of Joining {{ optional($user->joining_date)->format('M d, Y') ?? 'โ€”' }}
Direct Team Reports {{ $user->directReports->count() }} team members

Contact & Account Security

Email Address {{ $user->email }}
Mobile Number {{ $user->mobile ?: 'Not provided' }}
Data Access Scope {{ $user->access_scope ?? 'all' }} records
Two-Factor Authentication @if($user->two_factor_enabled) ๐Ÿ›ก๏ธ Enabled (2FA Active) @else Disabled @endif
Last Login {{ optional($user->last_login_at)->format('M d, Y h:i A') ?? 'Never' }}
Last Login IP {{ $user->last_login_ip ?? 'โ€”' }}
@endsection