@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @push('css') @endpush @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{-- Card Header Standar MSJ --}}
Result {{ $title_menu ?? 'Report Data User' }}
Mode: {{ $view_mode === 'summary' ? 'Order Summary' : 'Only Batch Data' }}
Last Update: {{ date('d F Y, H:i') }}

{{-- Action Buttons: Hanya tombol Kembali --}}
@if ($view_mode === 'summary') @else
@endif
{{-- Table Container --}}
@if ($view_mode === 'summary') {{-- ========================================================== --}} {{-- MODE 2: ORDER SUMMARY --}} {{-- ========================================================== --}} @forelse($summary_data as $index => $row) @empty @endforelse
NO USER PENARIK GEDUNG TANGGAL NO. ORDER CUSTOMER MATERIAL QTY ORDER INSP. LEVEL QTY SAMPLING ACCEPT NUMB REJECT NUMB TOTAL PRODUKSI GRADE A/B GRADE C GRADE D GRADE E CEK OK CEK NOT OK ACTUAL CEK KEPUTUSAN
{{ $summary_data->firstItem() + $index }} {{ $row->user_create ?? '-' }} {{ $row->nama_gedung ?? ($row->kode_gedung ?? '-') }} {{ $row->production_date ? \Carbon\Carbon::parse($row->production_date)->format('d/m/Y') : '-' }} {{ $row->order_no }} {{ $row->customer_name ?? '-' }} {{ $row->material ?? '-' }} {{ $row->order_qty !== null ? number_format($row->order_qty, 0, ',', '.') : '-' }} {{ $row->level_no !== null ? (is_numeric($row->level_no) ? (int)$row->level_no : $row->level_no) : '-' }} {{ $row->sampling !== null ? number_format($row->sampling, 0, ',', '.') : '-' }} {{ $row->accept_qty !== null ? number_format($row->accept_qty, 0, ',', '.') : '-' }} {{ $row->reject_qty !== null ? number_format($row->reject_qty, 0, ',', '.') : '-' }} {{ $row->qty_produksi }} {{ $row->grade_ab }} {{ $row->grade_c }} {{ $row->grade_d }} {{ $row->grade_e }} {{ $row->cek_ok }} {{ $row->cek_not_ok }} {{ $row->actual_cek }} @if ($row->keputusan === 'DITERIMA') DITERIMA @elseif ($row->keputusan === 'DITOLAK') DITOLAK @else {{ $row->keputusan }} @endif
Tidak ada data user yang sesuai dengan filter.
@else {{-- ========================================================== --}} {{-- MODE 1: BATCH DATA --}} {{-- ========================================================== --}} @php $dynamicColumnNames = $batch_dynamic_columns ?? []; $batchTableColspan = 31 + count($dynamicColumnNames); @endphp @foreach ($dynamicColumnNames as $columnName) @endforeach @if (false) @forelse($batch_data as $index => $row) @php $rowCheckResult = $row->check_result ?? null; $is_defect = ($row->isactive == '0' || in_array(strtoupper(trim($rowCheckResult ?? '')), ['NOT OK', 'NOK', 'CEK NOT OK', 'CEK_NOT_OK'])); @endphp @php $det = $row->dynamic_details ?? []; @endphp @php $remarkCell = (!empty($row->ddtext) && !in_array(strtoupper(trim($row->ddtext)), ['QC', 'PRD', 'MKT'], true)) ? $row->ddtext : ((!empty($row->validation_remark) && !in_array(strtoupper(trim($row->validation_remark)), ['QC', 'PRD', 'MKT'], true)) ? $row->validation_remark : '-'); @endphp @foreach ($dynamicColumnNames as $columnName) @php $dynamicValue = $det[$columnName] ?? null; if ($dynamicValue === null || $dynamicValue === '') { $dynamicText = '-'; } elseif (is_array($dynamicValue)) { $dynamicText = json_encode($dynamicValue); } elseif (is_bool($dynamicValue)) { $dynamicText = $dynamicValue ? 'TRUE' : 'FALSE'; } elseif (is_numeric($dynamicValue)) { $dynamicText = number_format((float) $dynamicValue, 3, ',', '.'); } else { $dynamicText = (string) $dynamicValue; } @endphp @endforeach @empty @endforelse @endif
NO USER PENARIK GEDUNG TANGGAL NO. ORDER WORK CENTER SOLD TO NAME 1 SEARCH TERM QTY ORDER ROLL UNIT INSP. LEVEL QTY SAMPLING ACCEPT NUMB REJECT NUMB GSM WIDTH LENGTH WEIGHT UNIT BATCH NO JOINT QTY MATERIAL VALIDATION GRADE DEFECT CLASSIFY VALIDATION REMARK VALIDATION CONDITION SOURCE ROLL JUMBO ROLL CHECK RESULT SHORT TEXT{{ strtoupper($columnName) }}
{{ $batch_data->firstItem() + $index }} {{ $row->user_create ?? '-' }} {{ $row->nama_gedung ?? ($row->kode_gedung ?? '-') }} {{ $row->production_date ? \Carbon\Carbon::parse($row->production_date)->format('d/m/Y') : '-' }} {{ $row->order_no }} {{ $row->work_center ?? '-' }} {{ $row->sold_to ?? '-' }} {{ \Illuminate\Support\Str::limit($row->name_1 ?? '-', 24) }} {{ $row->search_term ?? '-' }} {{ $row->order_qty !== null ? number_format($row->order_qty, 0, ',', '.') : '-' }} {{ $row->roll_unit !== null ? number_format($row->roll_unit, 3, ',', '.') : '-' }} {{ $row->level_no !== null ? (is_numeric($row->level_no) ? (int)$row->level_no : $row->level_no) : '-' }} {{ $row->sampling !== null ? number_format($row->sampling, 0, ',', '.') : '-' }} {{ $row->accept_qty !== null ? number_format($row->accept_qty, 0, ',', '.') : '-' }} {{ $row->reject_qty !== null ? number_format($row->reject_qty, 0, ',', '.') : '-' }} {{ $row->gsm !== null ? number_format($row->gsm, 3, ',', '.') : '-' }} {{ $row->width !== null ? number_format($row->width, 3, ',', '.') : '-' }} {{ $row->length !== null ? number_format($row->length, 3, ',', '.') : '-' }} {{ ($row->weight ?? $row->quantity) !== null ? number_format((float) ($row->weight ?? $row->quantity), 3, ',', '.') : '-' }} {{ $row->unit ?? 'KG' }} {{ $row->batch_no ?? '-' }} {{ $row->joint_qty ?? 0 }} {{ $row->material ?? '-' }} {{ $row->validation_grade ?: '-' }} {{ $row->defect_classify ?? '-' }} {{ $remarkCell }} {{ $row->validation_condition ?? '-' }} {{ $row->source_roll ?? '-' }} {{ $row->jumbo_roll ?? '-' }} @if (in_array(strtoupper(trim($rowCheckResult ?? '')), ['OK', 'CEK OK', 'CEK_OK'])) CEK OK @elseif (in_array(strtoupper(trim($rowCheckResult ?? '')), ['NOT OK', 'NOK', 'CEK NOT OK', 'CEK_NOT_OK'])) CEK NOT OK @else No Cek @endif {{ $det['KURZTEXT'] ?? ($det['DDTEXT'] ?? ($det['SHORT_TEXT'] ?? '-')) }} {{ $dynamicText }}
Tidak ada data user yang sesuai dengan filter.
@endif
{{-- Pagination Bar --}}
Note : ( Data not active / Defect )
@if ($view_mode === 'summary') {{ $summary_data->appends(request()->except('page'))->links('pagination::bootstrap-5') }} @else {{-- Pagination and search are handled by DataTables server-side. --}} @endif
@php $dataTableFilters = collect($filter_params ?? [])->except(['_token', 'page', 'check_filter', 'batch_search', 'draw', 'start', 'length', 'search', 'order', 'columns'])->all(); $dataTableDynamicColumns = $batch_dynamic_columns ?? []; @endphp @endsection