@extends('layouts.app') @section('title', 'Quality Control') @section('breadcrumb') Produksi Quality Control @endsection @section('content')

Quality Control

Inspeksi kualitas hasil cetak sebelum pengiriman ke pelanggan

{{-- QC Stats --}}
@php $qcStats = [ ['label'=>'Inspeksi Hari Ini', 'val'=>$stats['today'] ?? 12, 'icon'=>'bi-clipboard-check','color'=>'#1B4FD8','bg'=>'#EEF3FF'], ['label'=>'Lulus QC', 'val'=>$stats['pass'] ?? 10, 'icon'=>'bi-check-circle-fill','color'=>'#059669','bg'=>'#D1FAE5'], ['label'=>'Reject / Rework', 'val'=>$stats['reject'] ?? 2, 'icon'=>'bi-x-circle-fill', 'color'=>'#DC2626','bg'=>'#FEE2E2'], ['label'=>'Defect Rate', 'val'=>($stats['defect_rate'] ?? 3.2).'%','icon'=>'bi-percent','color'=>'#D97706','bg'=>'#FEF3C7'], ]; @endphp @foreach($qcStats as $s)
{{ $s['label'] }}
{{ $s['val'] }}
@endforeach
{{-- Chart Defect --}}
Defect Rate 30 Hari Terakhir
Jenis Defect
{{-- QC History Table --}}
Riwayat Inspeksi QC
@foreach($qcChecks as $qc) @php $defectRate = $qc->oplah_check > 0 ? round($qc->oplah_reject / $qc->oplah_check * 100, 1) : 0; $statusCls = $qc->status === 'pass' ? 'pf-status-selesai' : ($qc->status === 'rework' ? 'pf-status-pending' : 'pf-status-batal'); $statusLbl = ['pass'=>'Lulus','rework'=>'Rework','fail'=>'Ditolak'][$qc->status] ?? '-'; @endphp @endforeach
Job Order Pekerjaan Tgl Inspeksi Inspector Diperiksa Lulus Reject Defect Rate Jenis Defect Status Aksi
{{ $qc->jobOrder?->no_jo }} {{ $qc->jobOrder?->nama_pekerjaan }} {{ $qc->tgl_check?->format('d/m/Y') }} {{ $qc->inspector?->name ?? '-' }} {{ number_format($qc->oplah_check) }} {{ number_format($qc->oplah_ok) }} {{ number_format($qc->oplah_reject) }} {{ $defectRate }}% @if($qc->jenis_reject) @foreach(explode(',', $qc->jenis_reject) as $j) {{ trim($j) }} @endforeach @else - @endif {{ $statusLbl }}
@if($qc->status === 'rework') @endif
{{-- ===== MODAL INSPEKSI QC ===== --}} @endsection @push('scripts') @endpush