@extends('layouts.app') @section('title', $employee->name) @section('content')
{{ $employee->initials }}
{{ $employee->employee_number }} · {{ str_replace('_',' ',$employee->employment_type) }}

{{ $employee->name }}

{{ $employee->position?->title ?? $employee->role }} · {{ $employee->departmentRecord?->name ?? $employee->department }}

{{ $employee->status }}← Directory
Current salary
${{ number_format($employee->annual_salary ?? 0) }}
Annual base · USD
Reports to
{{ $employee->managerRecord?->name ?? 'Executive level' }}
{{ $employee->managerRecord?->role ?? 'No manager assigned' }}
Direct reports
{{ $employee->directReports->count() }}
Current reporting line
Archive records
{{ $employee->documents->count() }}
{{ $employee->histories->count() }} history events

Employee master record

Personal, organization, and payroll information

@foreach([ 'Employee number'=>$employee->employee_number,'Work email'=>$employee->email,'Phone'=>$employee->phone ?: '—', 'Department'=>$employee->departmentRecord?->name,'Position'=>$employee->position?->title, 'Grade'=>$employee->position?->grade,'Location'=>$employee->location,'Start date'=>$employee->start_date->format('d M Y'), 'Employment type'=>str_replace('_',' ',$employee->employment_type),'Manager'=>$employee->managerRecord?->name ?? '—', 'Bank'=>$employee->bank_name ?: '—','Bank account'=>$employee->bank_account ?: '—', 'Tax number'=>$employee->tax_number ?: '—','Emergency contact'=>$employee->emergency_contact_name ?: '—', ] as $label=>$value)
{{ $label }}{{ $value ?: '—' }}
@endforeach

Leave balances

Entitlement ledger for {{ now()->year }}

@foreach($employee->leaveBalances as $balance)
{{ $balance->leave_type }}{{ number_format($balance->used_days,1) }} used · {{ number_format($balance->pending_days,1) }} pending
{{ number_format($balance->available_days,1) }}days available
@endforeach

Salary history

Effective-dated compensation ledger

@if(auth()->user()->isHrSuperAdmin())
+ Salary change
@csrf
@endif
@foreach($employee->salaryRecords as $salary)@endforeach
EffectiveReasonFrequencyAmount
{{ $salary->effective_from->format('d M Y') }}@if($salary->effective_to)
to {{ $salary->effective_to->format('d M Y') }}
@endif
{{ $salary->reason }}{{ $salary->frequency }}{{ $salary->currency }} {{ number_format($salary->amount,2) }}

Private document archive

Contracts, IDs, certificates, and HR records

@if(auth()->user()->isHrSuperAdmin())
+ Archive document
@csrf
@endif
@forelse($employee->documents as $document)
{{ $document->title }}{{ ucfirst($document->category) }} · {{ $document->file_name }} · {{ number_format($document->file_size/1024) }} KB
{{ $document->expires_at ? 'Expires '.$document->expires_at->format('M Y') : 'Permanent' }}
@empty

No archived documents.

@endforelse

Complete employee history

Chronological employment, compensation, document, and organizational events

@foreach($employee->histories as $history)
{{ ucfirst(str_replace('_',' ',$history->event_type)) }}

{{ $history->description }}

{{ $history->occurred_at->format('d M Y, H:i') }}
@endforeach
@endsection