{{-- ===================================================== COMPANY HEADER ====================================================== --}}
@if($template->company_name)
{{ $template->company_name }}
@endif @if($template->company_address)
{{ $template->company_address }}
@endif @if($template->company_phone || $template->company_email || $template->company_website)
@if($template->company_phone) {{ $template->company_phone }} @endif @if($template->company_phone && $template->company_email)   |   @endif @if($template->company_email) {{ $template->company_email }} @endif @if($template->company_website)   |   {{ $template->company_website }} @endif
@endif
{{-- ===================================================== MEMO TITLE ====================================================== --}}
{{ $template->memo_title ?: 'INTERNAL MEMO' }}
{{ $memo->memo_no }}
{{-- ===================================================== MEMO INFORMATION ====================================================== --}}
{{ $template->recipient_label ?: 'Kepada' }} : {{ $memo->recipientUser?->name ?? '-' }}
Department : {{ $memo->recipientDepartment?->department_name ?? 'All Department' }}
{{ $template->subject_label ?: 'Perihal' }} : {{ $memo->subject }}
Tanggal : {{ $memo->memo_date?->format( $template->date_format ?: 'd F Y' ) }}
Priority : {{ $memo->priority }}
{{-- ===================================================== CONTENT ====================================================== --}}
{!! nl2br(e($content)) !!}
{{-- ===================================================== CLOSING ====================================================== --}} @if($template->closing_text)
{!! nl2br(e($template->closing_text)) !!}
@endif {{-- ===================================================== APPROVAL ====================================================== --}} @if((int) $memo->approval_required > 0)
Approval
{{-- APPROVER 1 --}} {{-- APPROVER 2 --}} @if((int) $memo->approval_required === 2) @endif
Approver User Status
Approver 1 {{ $memo->approver1?->name ?? '-' }} @php $status1 = strtolower( $memo->approver_1_status ?? '' ); @endphp @if($status1 === 'approved') Approved @elseif($status1 === 'rejected') Rejected @else {{ $memo->approver_1_status ?? 'Pending' }} @endif
Approver 2 {{ $memo->approver2?->name ?? '-' }} @php $status2 = strtolower( $memo->approver_2_status ?? '' ); @endphp @if($status2 === 'approved') Approved @elseif($status2 === 'rejected') Rejected @else {{ $memo->approver_2_status ?? 'Pending' }} @endif
@endif {{-- ===================================================== SIGNATURE ====================================================== --}}
{{ $memo->memo_date?->format( $template->date_format ?: 'd F Y' ) }}
{{ $template->signature_name ?: ($memo->sender?->name ?? '-') }}
@if($template->signature_position)
{{ $template->signature_position }}
@endif
{{-- ===================================================== FOOTER ====================================================== --}}