@if ($documents->isEmpty())

Tidak ada dokumen sample yang perlu di-approve.

Semua pengajuan sample sudah diproses.

@else @foreach ($documents as $doc)
{{-- Header Info --}}
Company Logo

No. {{ $doc->id_ps }}

Pengajuan Sample
Customer: {{ $doc->customer ?? '-' }} Project: {{ $doc->project ?? '-' }} End User: {{ $doc->end_user ?? '-' }} Deliver To: {{ $doc->deliver_to ?? '-' }} Attention To: {{ $doc->attn_to ?? '-' }} Ship To: {{ $doc->ship_to ?? '-' }}
Deadline: {{ $doc->deadline ? \Carbon\Carbon::parse($doc->deadline)->translatedFormat('d F Y') : '-' }} Sales: {{ $doc->nama_slsman ?? '-' }} Classify: {{ $doc->classify_sample ?? '-' }}

Data QC & Detail Item:

Informasi Sample
@if ($doc->jenis_sample === 'Improved' && !empty($doc->gedung_sample))
@endif {{-- Items Section (Full QC Approval Layout) --}}
Item Sample
@if($doc->items && $doc->items->isNotEmpty()) @foreach($doc->items as $index => $item)
{{-- Item Header with Toggle --}}
Item {{ $index + 1 }}
{{-- Content --}}
{{-- Standard Specs --}}
{{-- Detail Produksi (QC Data) --}}
Item {{ $index + 1 }} - Detail Produksi
@if(in_array($item->sumber_material, ['Produksi', 'ORU']))
@endif
@endforeach @else

Tidak ada data item sample

@endif
{{-- History Notes (Matching Ongsmp Style - EXACT COPY) --}} @if(isset($doc->previous_notes) && count($doc->previous_notes) > 0)
@foreach($doc->previous_notes as $pnote)
{{ $pnote['level_label'] }} {{ \Carbon\Carbon::parse($pnote['date'])->format('d/m/Y H:i') }}

{!! nl2br(e(trim($pnote['note']))) !!}

@endforeach
@endif {{-- Action Section --}}
@csrf
Catatan wajib diisi jika me-reject dokumen.
@endforeach @endif

© {{ date('Y') }} PT Multi Spunindo Jaya Tbk