@extends('layouts.app') @section('title', 'User Details') @section('content')

{{ $user->name }}

{{ $user->email }}

@if($user->is_active) Active @else Inactive @endif

Role

{{ $user->role->name ?? 'No Role' }}

Company

{{ $user->company->name ?? 'No Company' }}

Department

{{ $user->department->name ?? 'No Department' }}

Employee ID

{{ $user->employee_id_number ?? 'N/A' }}

Phone

{{ $user->phone ?? 'N/A' }}

Job Title

{{ $user->job_title ?? 'N/A' }}

Employment Type

{{ ucfirst($user->employment_type) }}

Date of Hire

{{ $user->date_of_hire ? $user->date_of_hire->format('M d, Y') : 'N/A' }}

Personal Information

Date of Birth

{{ $user->date_of_birth ? $user->date_of_birth->format('M d, Y') : 'N/A' }}

Nationality

{{ $user->nationality ?? 'N/A' }}

Blood Group

{{ $user->blood_group ?? 'N/A' }}

Known Allergies

{{ $user->known_allergies ?? 'None' }}

HSE Information

Direct Supervisor

{{ $user->directSupervisor->name ?? 'None' }}

HSE Training History

{{ $user->hse_training_history ? 'Available' : 'None' }}

Competency Certificates

{{ $user->competency_certificates ? 'Available' : 'None' }}

Account Information

Last Login

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

Last Login IP

{{ $user->last_login_ip ?? 'N/A' }}

Failed Login Attempts

{{ $user->failed_login_attempts }}

Password Changed

{{ $user->password_changed_at ? $user->password_changed_at->format('M d, Y') : 'Never' }}

Must Change Password

{{ $user->must_change_password ? 'Yes' : 'No' }}

Account Status

@if($user->deactivated_at) Deactivated on {{ $user->deactivated_at->format('M d, Y') }} @if($user->deactivation_reason) ({{ $user->deactivation_reason }}) @endif @else Active @endif

Recent Activity

@if($recentActivity->count() > 0)
@foreach($recentActivity as $activity)

{{ $activity->description }}

{{ $activity->created_at->format('M d, Y H:i') }}

@endforeach
@else

No recent activity found.

@endif
@endsection