{{-- Recipients List Card --}} @if($surat->recipients && $surat->recipients->count() > 0) @php $kepadaRecipients = $surat->recipients->filter(fn($r) => $r->recipient_category === 'kepada'); $tembusanRecipients = $surat->recipients->filter(fn($r) => $r->recipient_category === 'tembusan'); $otherRecipients = $surat->recipients->filter(fn($r) => !in_array($r->recipient_category, ['kepada', 'tembusan'])); @endphp
Penerima Surat
@if($kepadaRecipients->isNotEmpty())
Kepada
@foreach($kepadaRecipients as $recipient) @include('surat-keluar-workflow.partials.recipient-item', ['recipient' => $recipient]) @endforeach @endif @if($tembusanRecipients->isNotEmpty())
Tembusan (CC)
@foreach($tembusanRecipients as $recipient) @include('surat-keluar-workflow.partials.recipient-item', ['recipient' => $recipient]) @endforeach @endif @if($otherRecipients->isNotEmpty()) @foreach($otherRecipients as $recipient) @include('surat-keluar-workflow.partials.recipient-item', ['recipient' => $recipient]) @endforeach @endif
@endif