@php $na = fn ($value) => filled($value) ? $value : '—'; $statusLabel = str_replace('_', ' ', (string) ($employee->employment_status ?? '—')); $tenureLabel = $employee->hire_date ? $employee->hire_date->diffForHumans(now(), true) : '—'; $groupCount = $employee->staffGroups->count(); $reportCount = $employee->directReports->count(); @endphp
Status
{{ $statusLabel }}
Tenure
{{ $tenureLabel }}
Since {{ optional($employee->hire_date)->format('M j, Y') ?? '—' }}
Organisation
{{ $na($employee->department) }}
{{ $na($employee->branch) }} branch
Reporting
{{ $employee->supervisor?->full_name ?? '—' }}
{{ $reportCount }} direct {{ str('report')->plural($reportCount) }}
| Date | Status |
|---|---|
| {{ optional($record->attendance_date)->format('M j, Y') ?? '—' }} | {{ \App\Models\HrAttendanceRecord::statusLabels()[$record->status] ?? $record->status ?? '—' }} |