@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
{{-- Employment snapshot --}}

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) }}

Job title
{{ $na($employee->job_title) }}
Employee number
{{ $na($employee->employee_number) }}
Work type
{{ $na($employee->work_type) }}
On payroll
{{ ($employee->include_in_payroll ?? false) ? 'Yes' : 'No' }}
Staff groups
@if ($groupCount === 0) Not assigned to any staff groups @else
    @foreach ($employee->staffGroups as $group)
  • {{ $group->name }}
  • @endforeach
@endif
@if (! empty($attendanceRecords))
@foreach (array_slice($attendanceRecords, 0, 5) as $record) @endforeach
Date Status
{{ optional($record->attendance_date)->format('M j, Y') ?? '—' }} {{ \App\Models\HrAttendanceRecord::statusLabels()[$record->status] ?? $record->status ?? '—' }}
@endif