@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'Edit']) {{-- Top Action Card (Persis seperti transc/trscoa/add.blade.php) --}}
{{-- Kolom Kiri: Tombol Aksi --}}
Kembali @if ($qc->status === 'draft' || $qc->status === 'rejected') @endif
{{-- Kolom Kanan: Session Alert & Badge Status --}}
@if (!empty($qc->note_reject) || $qc->status === 'rejected') @endif @if ($qc->status === 'draft') Draft Mode @elseif ($qc->status === 'pending') Pending Check @elseif ($qc->status === 'rejected') Rejected / Revisi @endif
@csrf @method('PUT')
Test Product Outsource: {{ $qc->material_code ?: '-' }}

@include('components.alert')
{{-- NAV TABS: Header & Detail Tambahan --}}
{{-- ================= TAB 1: HEADER ================= --}}
{{-- BARIS 1: Tanggal Uji, Tanggal Datang, No Batch, IO --}}
{{-- BARIS 2: Material, Deskripsi Material, Jenis Material, Warna --}}
{{-- BARIS 3: Customer & Supplier --}}
{{-- BARIS 4: Tested By, Send To & Catatan --}}
{{-- ================= TAB 2: DETAIL TAMBAHAN ================= --}}
{{-- CARD DETAIL: GRID TITIK UJI RUN MATRIX --}}
Detail Titik Uji
@if (!empty($spec_label)) {{ $spec_label }} @endif

{{-- Run 1..100 Column Headers --}} @for ($r = 1; $r <= 100; $r++) @endfor {{-- Populated from existing details via JS --}}
MIC Name Unit Spesifikasi RUN {{ $r }} AVG Val
Min Max
{{-- Bottom Action Card --}}
{{-- MODAL SELECT MATERIAL --}} {{-- MODAL PILIH MIC (PERSIS SEPERTI TRSCOA) --}} @if (!empty($qc->note_reject) || $qc->status === 'rejected') @php $rejectEntries = []; $rawEntries = preg_split('/\r\n---\r\n|\n---\n|\r\n\r\n|\n\n|---/', $qc->note_reject); foreach ($rawEntries as $entry) { $entry = trim($entry); if (!empty($entry)) { if (preg_match('/\[REJECT \/ REVISION by (.*?) on (.*?)]: (.*)/s', $entry, $matches)) { $rejectEntries[] = [ 'by' => trim($matches[1]), 'date' => trim($matches[2]), 'msg' => trim($matches[3]), 'raw' => $entry, ]; } else { $rejectEntries[] = [ 'by' => null, 'date' => null, 'msg' => $entry, 'raw' => $entry, ]; } } } $totalRevisions = count($rejectEntries); @endphp {{-- Modal Riwayat Catatan Revisi / Reject --}} @endif @endsection @push('js') @endpush @push('css') @endpush