@extends('layouts.app') @section('content') @php $category = $category ?? request('category', 'all'); $categories = [ 'all' => 'Semua', 'versant' => 'Versant', 'indoor' => 'Indoor', 'outdoor' => 'Outdoor', ]; $prettyProduct = function ($text) { $s = trim((string) ($text ?? '')); if ($s === '') return '-'; $s = str_replace(['_', '-', '/'], ' ', $s); $s = preg_replace('/\b(OUTDOOR|INDOOR|VERSANT)(?=[A-Z0-9])/i', '$1 ', $s); $s = preg_replace('/([a-z])([A-Z])/', '$1 $2', $s); $s = preg_replace('/([A-Za-z])\s*(UV|PVC|GSM)(?=\d)/i', '$1 $2', $s); $s = preg_replace('/\bFLEKSI\s*(BENNER|BANNER)\b/i', 'FLEKSI $1', $s); $s = preg_replace('/(\d+)\s*[xX]\s*(\d+)\s*(\d+)\s*pcs\b/i', '$1x$2 $3pcs', $s); $s = preg_replace('/([A-Za-z])(\d)/', '$1 $2', $s); $s = preg_replace('/(\d)([A-Za-z])/', '$1 $2', $s); $s = preg_replace('/(\d+)\s*[xX]\s*(\d+)/', '$1x$2', $s); $s = preg_replace('/\s+/', ' ', trim($s)); $s = ucwords(strtolower($s)); $s = preg_replace('/\bGsm\b/', 'GSM', $s); $s = preg_replace('/\bPvc\b/', 'PVC', $s); $s = preg_replace('/\bUv\b/', 'UV', $s); $s = preg_replace('/\b(\d+)\s+GSM\b/', '$1GSM', $s); $s = preg_replace('/\bFleksi(Benner|Banner)\b/i', 'Fleksi Banner', $s); $s = preg_replace('/\bFleksi\s+Benner\b/i', 'Fleksi Banner', $s); $s = preg_replace('/\b(\d+)\s+Pcs\b/i', '$1pcs', $s); $s = preg_replace('/\s+/', ' ', $s); return trim($s); }; @endphp @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Cari @if($search) Reset @endif
@foreach($categories as $key => $label) {{ $label }} @endforeach
@if($search)
Hasil pencarian: "{{ $search }}"
@endif @if($viewMode === 'per_invoice')

Antrian

{{ $pendingOrders->count() }}

Order siap dikerjakan, tampil penuh ke bawah

@forelse($pendingOrders as $order)
{{ $order->invoice_number }}

{{ $order->customer_name }}

@foreach($order->activeItems->take(2) as $item)
{{ $prettyProduct($item->product_name) }} - {{ $item->file_name }} ({{ $item->qty }}pcs) @if(($item->sisi ?? 1) == 2) 2 SISI @endif @if($item->finishing_note) • {{ $item->finishing_note }} @endif
@endforeach @if($order->activeItems->count() > 2) +{{ $order->activeItems->count() - 2 }} item lainnya @endif
@empty
Tidak ada antrian
@endforelse

Proses Cetak

{{ $prosesOrders->count() }}

Sedang dicetak, siap dilanjutkan ke finishing

@forelse($prosesOrders as $order)
{{ $order->invoice_number }}

{{ $order->customer_name }}

@foreach($order->activeItems->take(2) as $item)
{{ $prettyProduct($item->product_name) }} - {{ $item->file_name }} ({{ $item->qty }}pcs) @if(($item->sisi ?? 1) == 2) 2 SISI @endif
@endforeach @if($order->activeItems->count() > 2) +{{ $order->activeItems->count() - 2 }} item lainnya @endif
@empty
Tidak ada yang dicetak
@endforelse
@else

Antrian

{{ $pendingItems->count() }}

Item siap dikerjakan, tampil penuh ke bawah

@forelse($pendingItems as $item)

{{ $item->file_name }}

{{ $item->order->invoice_number }} - {{ $item->order->customer_name }}
Produk: {{ $prettyProduct($item->product_name) }}
@if($item->material_name)
Bahan: {{ $item->material_name }}
@endif
Ukuran: {{ $item->size_description }}
Qty: {{ $item->qty }} pcs @if(($item->sisi ?? 1) == 2) 2 SISI @endif
@if($item->finishing_note)

FINISHING:

{{ $item->finishing_note }}

@endif
@empty
Tidak ada antrian
@endforelse

Proses Cetak

{{ $prosesItems->count() }}

Sedang dicetak, siap dilanjutkan ke finishing

@forelse($prosesItems as $item)

{{ $item->file_name }}

{{ $item->order->invoice_number }} - {{ $item->order->customer_name }}
Produk: {{ $prettyProduct($item->product_name) }}
@if($item->material_name)
Bahan: {{ $item->material_name }}
@endif
Ukuran: {{ $item->size_description }}
Qty: {{ $item->qty }} pcs @if(($item->sisi ?? 1) == 2) 2 SISI @endif
@if($item->finishing_note)

FINISHING:

{{ $item->finishing_note }}

@endif
@empty
Tidak ada yang dicetak
@endforelse
@endif @endsection @push('scripts') @endpush