@extends('admin.layouts.app') @section('title', $employee->name . ' - Employee Profile Details') @section('content')
Dashboard Employees {{ $employee->name }}
Back to Directory
{{ $employee->name }}

{{ $employee->name }}

{{ $employee->employee_id }}

{{ $employee->designationRelation?->name ?? $employee->designation }}

@csrf @method('PATCH')
{{ $employee->departmentRelation?->name ?? $employee->department }} {{ $employee->formatted_experience }} {{ $employee->employment_type }} Joined {{ $employee->formatted_joining_date }}

Professional & Personal Information

Full Name {{ $employee->name }}
Employee System ID {{ $employee->employee_id }}
Department {{ $employee->departmentRelation?->name ?? $employee->department }}
Designation / Role {{ $employee->designationRelation?->name ?? $employee->designation }}
Medical Qualifications {{ $employee->qualification ?? 'Not Specified' }}
Total Experience {{ $employee->formatted_experience }} ({{ $employee->experience_years }} Years)
Gender {{ $employee->gender }}
Age & Date of Birth @if($employee->date_of_birth) {{ $employee->age }} ({{ $employee->date_of_birth->format('M d, Y') }}) @else N/A @endif
Monthly Salary {{ $employee->formatted_salary }}

Contact & Emergency Details

Official Email {{ $employee->email }}
Emergency Contact {{ $employee->emergency_contact ?? 'N/A' }}
Residential Address {{ $employee->address ?? 'N/A' }}

Work Shift & Duty Schedule

Primary Assigned Shift

{{ $employee->shift?->name ?? 'No Primary Shift' }}

{{ $employee->shift?->time_range ?? '08:00 AM - 04:00 PM' }}

{{ $employee->shift_rotation_type ?? 'Weekly Auto' }}

7-Day Weekly Shift Assignment

@php $schedule = $employee->weekly_shift_schedule ?? []; $days = [ 'monday' => 'Monday', 'tuesday' => 'Tuesday', 'wednesday' => 'Wednesday', 'thursday' => 'Thursday', 'friday' => 'Friday', 'saturday' => 'Saturday', 'sunday' => 'Sunday' ]; @endphp
@foreach($days as $key => $dayLabel) @php $assignedShiftId = $schedule[$key] ?? ($key === 'saturday' || $key === 'sunday' ? 'off' : $employee->shift_id); $matchedShift = $shifts->firstWhere('id', $assignedShiftId); $isOff = $assignedShiftId === 'off' || empty($assignedShiftId); @endphp
{{ $dayLabel }} @if($isOff) Day Off / Rest @elseif($matchedShift) {{ $matchedShift->name }} ({{ $matchedShift->time_range }}) @else Assigned (ID: {{ $assignedShiftId }}) @endif
@endforeach

Employee Record Management

Permanently remove staff record and photos from the database.

@csrf @method('DELETE')

Recent Biometric Attendance Logs ({{ $employee->name }})

View All Records →
@if($employee->attendances->isEmpty())
No biometric check-in logs recorded yet for this staff member.
@else
@foreach($employee->attendances as $att) @endforeach
Date Check-In Check-Out Face Match GPS Location Duration Status
{{ $att->date?->format('M d, Y') }} {{ $att->formatted_check_in_time ?? 'N/A' }} {{ $att->formatted_check_out_time ?? 'On Duty' }} {{ $att->check_in_face_match_score ?? '98.0' }}% @if($att->check_in_latitude) {{ number_format($att->check_in_latitude, 4) }}, {{ number_format($att->check_in_longitude, 4) }} @else N/A @endif {{ $att->worked_hours ?? 'In Progress' }} @if($att->check_out_time) Completed @else On Duty @endif
@endif
@endsection