@extends('layouts.app') @section('title', 'User Details: ' . $user->name) @section('content')

{{ $user->name }}

{{ $user->position ?? 'No position specified' }}

@foreach($user->roles as $role) {{ ucfirst($role->name) }} @endforeach
{{ $statistics['total_sales'] ?? 0 }}
Sales
{{ $statistics['total_purchases'] ?? 0 }}
Purchases
Contact Information
{{ $user->email }}
@if($user->phone)
{{ $user->phone }}
@endif @if($user->address)
{{ $user->address }}
@endif
Actions
@can('edit users') Edit User @endcan @can('delete users') @if($user->id != auth()->id())
@csrf @method('DELETE')
@endif @endcan
User Details

{{ $user->employee_id ?? 'Not assigned' }}

{{ $user->is_active ? 'Active' : 'Inactive' }}

{{ $user->department ?? 'Not assigned' }}

{{ $user->position ?? 'Not assigned' }}

{{ ucfirst($user->gender) ?? 'Not specified' }}

{{ $user->date_of_birth ? $user->date_of_birth->format('M d, Y') : 'Not specified' }}

{{ $user->hire_date ? $user->hire_date->format('M d, Y') : 'Not specified' }}

@if($user->last_login_at) {{ $user->last_login_at->format('M d, Y h:i A') }} @if($user->last_login_ip)
IP: {{ $user->last_login_ip }} @endif @else Never logged in @endif

{{ $user->notes ?? 'No notes' }}

Permissions
@foreach($permissions as $permission)
@endforeach
@endsection