@extends('layouts.app') @section('title', 'Employee Details') @section('content')
Back to Employees

Employee Details

Edit @if($employee->is_active)
@csrf
@else
@csrf
@endif

{{ $employee->name }}

{{ $employee->email }}

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

Employee ID

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

Role

{{ $employee->role->display_name ?? $employee->role->name ?? 'No Role' }}

Department

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

Job Title

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

Employment Type

{{ ucfirst(str_replace('_', ' ', $employee->employment_type ?? 'N/A')) }}

Date of Hire

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

@if($employee->directSupervisor)

Direct Supervisor

{{ $employee->directSupervisor->name }}

@endif

Statistics

Incidents Reported {{ $stats['incidents_reported'] }}
Toolbox Talks Attended {{ $stats['toolbox_talks_attended'] }}
Talks Conducted {{ $stats['toolbox_talks_conducted'] }}
@if($stats['last_login'])
Last Login {{ $stats['last_login']->diffForHumans() }}
@endif

Contact Information

Phone

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

Date of Birth

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

Nationality

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

Blood Group

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

Recent Activity

@forelse($recentActivity as $activity)

{{ $activity->description }}

{{ $activity->module }} • {{ $activity->action }}

{{ $activity->created_at->diffForHumans() }}
@empty

No recent activity

@endforelse
@endsection