@php $na = fn ($value) => filled($value) ? $value : '—'; $payroll = $payroll ?? ['configured' => false]; $line = $payroll['latest_line'] ?? null; @endphp

Profile summary

Personal

National ID
{{ $na($employee->national_id) }}
Gender
{{ $na($employee->gender) }}
Work type
{{ $na($employee->work_type) }}

Employment

Hire date
{{ optional($employee->hire_date)->format('M j, Y') ?? '—' }}
Supervisor
{{ $employee->supervisor?->full_name ?? '—' }}
Direct reports
{{ $employee->directReports->count() }}
Groups
{{ $employee->staffGroups->count() }}

Contact

Phone
{{ $na($employee->phone) }}
Email
{{ $na($employee->email) }}
@if (filled($employee->email) && \App\Support\LoanPermissionCatalog::actorCan(auth()->user(), \App\Support\LoanPermissionCatalog::HR_COMMUNICATIONS_MANAGE)) @endif
Next of kin
{{ $na($employee->next_of_kin_name) }}

Financial

Portfolio outstanding
KES {{ number_format((float) ($portfolioKpi['total_outstanding'] ?? 0), 0) }}
Staff loan balance
KES {{ number_format((float) ($activeStaffLoanBalance ?? 0), 0) }}
On payroll
{{ ($employee->include_in_payroll ?? false) ? 'Yes' : 'No' }}
Payment channel
{{ \App\Support\EmployeePaymentChannel::label($employee->payment_channel) }}
Latest net pay
{{ $payroll['latest_net_display'] ?? '—' }}
@if ($employee->payment_channel === \App\Support\EmployeePaymentChannel::BANK)
Bank
{{ $na($employee->bank_name) }}
Account holder
{{ $na($employee->bank_account_holder) }}
Account no.
{{ $na($employee->bank_account_number) }}
@elseif ($employee->payment_channel === \App\Support\EmployeePaymentChannel::MPESA)
M-Pesa name
{{ $na($employee->mpesa_registered_name) }}
M-Pesa no.
{{ $na($employee->mpesa_phone) }}
@endif

System access

Portal account
{{ $linkedUser ? 'Linked' : 'Not linked' }}
Login
{{ $employee->hasLoginAccess() ? 'Enabled' : 'Disabled' }}
Role
{{ $linkedUser ? ($linkedUser->displayLoanRoleLabel() ?: '—') : '—' }}
Capabilities
@if ($canViewStaffAccessMatrix ?? false) @else {{ count($effectivePermissions ?? []) }} @endif