@can('hr.employees.edit') Edit @endcan
@if($employee->photo) photo @else
{{ strtoupper(substr($employee->first_name,0,1).substr($employee->last_name,0,1)) }}
@endif

{{ $employee->full_name }}

{{ $employee->department?->name ?? '—' }}

@php $colors = ['active'=>'green','on_leave'=>'amber','terminated'=>'red']; $c = $colors[$employee->status] ?? 'gray'; @endphp {{ ucfirst(str_replace('_',' ',$employee->status)) }}
@foreach(['profile'=>'Profile','documents'=>'Documents','attendance'=>'Attendance','leaves'=>'Leaves','emergency'=>'Emergency'] as $key=>$label) @endforeach
{{-- Profile --}}
Employee Code
{{ $employee->employee_code }}
National ID
{{ $employee->national_id ?? '—' }}
Department
{{ $employee->department?->name ?? '—' }}
Position
{{ $employee->position?->title ?? '—' }}
Salary
{{ money($employee->salary) }}
Hire Date
{{ optional($employee->hire_date)->format('Y-m-d') ?? '—' }}
Phone
{{ $employee->phone ?? '—' }}
Linked User
{{ $employee->user?->name ?? '—' }}
Address
{{ $employee->address ?? '—' }}
{{-- Documents --}}
@can('hr.employees.edit')
@csrf
@endcan @forelse($employee->documents as $doc) @empty @endforelse
NameTypeUploaded
{{ $doc->name }}{{ $doc->type ?? '—' }} {{ $doc->created_at->format('Y-m-d') }} Download
No documents.
{{-- Attendance --}}
@forelse($attendances as $a) @empty @endforelse
DateCheck InCheck OutStatus
{{ $a->date->format('Y-m-d') }}{{ $a->check_in ?? '—' }}{{ $a->check_out ?? '—' }} {{ ucfirst($a->status) }}
No attendance records.
{{-- Leaves --}}
@forelse($leaves as $l) @empty @endforelse
TypeFromToDaysStatus
{{ ucfirst($l->type) }}{{ $l->from_date->format('Y-m-d') }}{{ $l->to_date->format('Y-m-d') }} {{ $l->days }} {{ ucfirst($l->status) }}
No leave records.
{{-- Emergency --}}
Contact Name
{{ $employee->emergency_contact_name ?? '—' }}
Contact Phone
{{ $employee->emergency_contact_phone ?? '—' }}