{{ isset($approver) ? $approver->role : 'Technical' }} Approval Form
@foreach($documents as $doc)
Sample: {{ $doc->id_ps }} - {{ $doc->customer }} @if(!empty($doc->project)) | Project: {{ $doc->project }} @endif @if(!empty($doc->end_user)) | End User: {{ $doc->end_user }} @endif
{{ $doc->jenis_sample }} @if($doc->jenis_sample === 'Improved' && !empty($doc->gedung_sample)) {{ $doc->gedung_sample }} @endif {{ $doc->deadline }}
@if(!empty($spvpdx_rejection_note))
Catatan Revisi:

{{ $spvpdx_rejection_note }}

@endif
@csrf
Keputusan:
Approve (ACC)
Reject
{{-- ACC Form --}}
FORM INPUT APPROVAL
@if($doc->jenis_sample === 'Improved' && !empty($doc->gedung_sample))
@endif
Item Sample
@if($doc->items && $doc->items->isNotEmpty()) @foreach($doc->items as $index => $item)
{{-- Item Header dengan Toggle --}}
@if($doc->items->count() > 1) Item {{ $index + 1 }} @else Item 1 @endif
{{-- Item Content --}}
{{-- Data Item Utama --}}
{{-- Detail Produksi (Collapsible) --}}
Item {{ $index + 1 }} - Detail Produksi (WAJIB)
@php $sumberValue = $item->sumber_material ?? ''; $sumberOptions = ['Produksi', 'ORU', 'Backup QA/PPIC']; @endphp
sumber_material ?? '', ['Produksi', 'ORU']) ? 'required' : '' }}>
{{-- Nomor COA dan No ROLL dihapus dari tahap approval --}}
{{-- No ROLL dihapus dari tahap approval --}}
{{-- End production content --}}
{{-- End production section --}}
{{-- End item-content --}}
@endforeach @else

Tidak ada data item sample

@endif {{-- Display previous notes dari admin, level 1, 2, 3 dengan layout ramping --}} @if (isset($doc->previous_notes) && !empty($doc->previous_notes))
@foreach ($doc->previous_notes as $index => $note)
{{ $note['level_label'] ?? $note['level'] }} @if (isset($note['date'])) {{ \Carbon\Carbon::parse($note['date'])->format('d/m/Y H:i') }} @endif

{{ trim($note['note']) }}

@endforeach
@endif
{{-- REJECT Form --}}
FORM INPUT REJECTION
@if($doc->jenis_sample === 'Improved' && !empty($doc->gedung_sample))
@endif
Item Sample
@if($doc->items && $doc->items->isNotEmpty()) @foreach($doc->items as $index => $item)
{{-- Item Header dengan Toggle --}}
@if($doc->items->count() > 1) Item {{ $index + 1 }} @else Item 1 @endif
{{-- Item Content --}}
{{-- FIXED: Tambah field untuk reject item --}}
{{-- End item-content --}}
@endforeach {{-- Container untuk custom items --}}
{{-- Button pertama untuk tambah item custom (hanya muncul jika belum ada item custom) --}}
@else

Tidak ada data item sample

@endif {{-- Display previous notes dari admin, level 1, 2, 3 dengan layout ramping --}} @if (isset($doc->previous_notes) && !empty($doc->previous_notes))
@foreach ($doc->previous_notes as $index => $note)
{{ $note['level_label'] ?? $note['level'] }} @if (isset($note['date'])) {{ \Carbon\Carbon::parse($note['date'])->format('d/m/Y H:i') }} @endif

{{ trim($note['note']) }}

@endforeach
@endif
@endforeach