{{ $profile->user?->name ?? $profile->employee_no }}

{{ $profile->designation?->localizedName() ?? '—' }} @if ($profile->department) · {{ $profile->department->localizedName() }} @endif · {{ $profile->employee_no }}

@php($statusColor = match ($profile->status) { \App\Enums\StaffStatus::Active => 'green', \App\Enums\StaffStatus::OnLeave => 'gold', \App\Enums\StaffStatus::Suspended => 'red', default => 'slate', }) {{ $profile->status->label() }} {{ __('app.hr.staff.back') }} @can('users.edit') {{ __('app.hr.staff.manage_account') }} @endcan
@if ($notice) {{ $notice }} @endif @if ($errors->any()) @endif
{{ __('app.hr.fields.employment_type') }}
{{ $profile->employment_type->label() }}
{{ __('app.hr.fields.joined_on') }}
{{ $profile->joined_on?->translatedFormat('d M Y') }}
{{ __('app.hr.fields.left_on') }}
{{ $profile->left_on?->translatedFormat('d M Y') ?? '—' }}
{{ __('app.hr.fields.department') }}
{{ $profile->department?->localizedName() ?? '—' }}
{{ __('app.hr.fields.designation') }}
{{ $profile->designation?->localizedName() ?? '—' }}
{{ __('app.hr.staff.account') }}
{{ $profile->user?->name ?? '—' }}
{{ __('app.hr.fields.email') }}
{{ $profile->user?->email ?? '—' }}
{{ __('app.hr.fields.phone') }}
{{ $profile->phone ?? '—' }}
{{ __('app.hr.fields.national_id') }}
{{ $profile->national_id ?? '—' }}
{{ __('app.hr.fields.date_of_birth') }}
{{ $profile->date_of_birth?->translatedFormat('d M Y') ?? '—' }}
{{ __('app.hr.fields.gender') }}
{{ $profile->gender?->label() ?? '—' }}
{{ __('app.hr.fields.emergency_contact_name') }}
{{ $profile->emergency_contact_name ?? '—' }} @if ($profile->emergency_contact_phone) {{ $profile->emergency_contact_phone }} @endif
{{ __('app.hr.fields.address') }}
{{ $profile->address ?? '—' }}
{{ __('app.hr.fields.qualifications') }}
{{ $profile->qualifications ?? '—' }}
@if ($profile->notes)
{{ __('app.hr.fields.notes') }}
{{ $profile->notes }}
@endif
@if ($profile->salaryStructure) @php($structure = $profile->salaryStructure)
{{ __('app.hr.fields.basic_salary') }}
{{ number_format((float) $structure->basic_salary, 2) }}
{{ __('app.hr.salary_structures.gross') }}
{{ number_format($structure->grossSalary(), 2) }}
{{ __('app.hr.fields.effective_from') }}
{{ $structure->effective_from?->translatedFormat('d M Y') }}
@if ($structure->items->isNotEmpty())
@foreach ($structure->items as $item) @endforeach
{{ __('app.hr.fields.component') }} {{ __('app.hr.fields.component_type') }} {{ __('app.hr.fields.amount') }}
{{ $item->component?->localizedName() ?? '—' }} {{ $item->component?->type->label() }} {{ number_format((float) $item->amount, 2) }}
@endif @else

{{ __('app.hr.staff.no_salary') }}

@endif
@forelse ($profile->advances->sortByDesc('id') as $advance)
{{ number_format((float) $advance->amount, 2) }} {{ $advance->status->label() }}

{{ __('app.hr.advance.outstanding') }}: {{ number_format($advance->outstanding(), 2) }} · {{ $advance->reason }}

@empty

{{ __('app.hr.staff.advance_empty') }}

@endforelse @can('staff_advances.view')
{{ __('app.hr.tabs.advances') }}
@endcan
@forelse ($profile->leaveApplications->sortByDesc('starts_on') as $application)
{{ $application->leaveType?->localizedName() }} {{ $application->status->label() }}

{{ $application->starts_on?->translatedFormat('d M Y') }} — {{ $application->ends_on?->translatedFormat('d M Y') }} · {{ $application->days }} {{ __('app.hr.leave.days') }}

@empty

{{ __('app.hr.staff.leave_empty') }}

@endforelse @can('leave.view')
{{ __('app.hr.tabs.leave') }}
@endcan
@forelse ($profile->payslips->sortByDesc('period') as $slip)
{{ $slip->period }} {{ $slip->status->label() }}

{{ __('app.hr.payroll.net') }}: {{ number_format((float) $slip->net_pay, 2) }}

@empty

{{ __('app.hr.staff.no_payslips') }}

@endforelse
@can('staff.edit')
@foreach ($documentTypes as $type) @endforeach
{{ __('app.actions.upload') }}
@endcan @if ($profile->documents->isEmpty())

{{ __('app.hr.staff.documents_empty') }}

@else
@foreach ($profile->documents as $document) @endforeach
{{ __('app.hr.fields.title') }} {{ __('app.hr.fields.document_type') }} {{ __('app.hr.fields.uploaded_by') }} {{ __('app.actions.download') }}
{{ $document->title ?? $document->original_name }} {{ $document->type->label() }} {{ $document->uploader?->name ?? '—' }}
{{ __('app.actions.download') }} @can('delete', $document) {{ __('app.actions.delete') }} @endcan
@endif