Document vault @if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @can('hrm.documents.manage') Pick a template and the employee — the placeholders are filled from the employment file. Override the subject or body only when this letter needs to differ from the template. @if ($templates->isEmpty()) Seed the letter templates or add them in the database to start issuing letters. @else
@csrf
@error('subject')

{{ $message }}

@enderror
@error('body')

{{ $message }}

@enderror

Placeholders: @{{name}}, @{{employee_no}}, @{{designation}}, @{{department}}, @{{basic_salary}}, @{{date_joined}}, @{{kra_pin}}, @{{facility}}.

@endif
@endcan Newest first. Open a letter to see the copy the employee signs in their portal. @if ($letters->isEmpty()) Generate the first letter above — it will also drop into the employee's document vault. @else
@foreach ($letters as $letter) @endforeach
Letter no Employee Subject Issued Signature Action
{{ $letter->letter_no }} {{ $letter->user?->name ?? '—' }} {{ $letter->user?->employee_no ?? '—' }} {{ $letter->subject }} {{ $letter->template?->name ?? 'Custom letter' }} {{ $letter->issued_at?->format('d M Y') }} {{ $letter->issuedBy?->name ?? '—' }} @if ($letter->is_acknowledged) {{ $letter->acknowledged_at?->format('d M Y H:i') }} @else @endif Open
{{ $letters->links() }}
@endif