Order Manager

Order Baru (POS)
@forelse($orders as $order) {{-- No. Order + Item badges --}} {{-- Waktu + Deadline --}} {{-- Customer --}} {{-- Total --}} {{-- Status Kerja --}} {{-- Status Bayar + Follow-up badges --}} {{-- Aksi — icon-only buttons with title tooltip --}} @empty @endforelse
No. Order Waktu Customer Total Status Kerja Bayar Aksi
{{ $order->order_number }}
@if($order->items->count() > 0)
@foreach($order->items as $item) {{ $item->qty }}x {{ Str::limit($item->product_name, 18) }} @endforeach
@endif
{{ \Carbon\Carbon::parse($order->date)->format('d/m/Y H:i') }}
@if($order->deadline)
{{ \Carbon\Carbon::parse($order->deadline)->format('d/m H:i') }}
@endif
{{ $order->customer->name ?? 'Walk-in' }}
{{ $order->customer->phone ?? '-' }}
Rp {{ number_format($order->grand_total, 0, ',', '.') }}
@php $sisa = $order->grand_total - ($order->payment->received_amount ?? 0); @endphp @if($sisa > 0)
Sisa: Rp {{ number_format($sisa, 0, ',', '.') }}
@else
Lunas ✓
@endif
@php $badgeMap = [ 'Order Baru' => 'bg-info text-white', 'Menunggu Pembayaran'=> 'bg-secondary text-white', 'Diproses' => 'bg-warning text-dark', 'Selesai' => 'bg-success text-white', 'Diambil/Dikirim' => 'bg-info text-dark', 'Cancelled' => 'bg-danger text-white', ]; $cls = $badgeMap[$order->work_status] ?? 'bg-secondary text-white'; @endphp {{ $order->work_status }} @php $payCls = $order->payment_status === 'Lunas' ? 'badge-lunas' : 'badge-belum-lunas'; @endphp {{ $order->payment_status }} @if($order->whatsappLogs && $order->whatsappLogs->whereIn('template_type', ['followup_1', 'followup_2', 'followup_3'])->count() > 0)
@foreach(['followup_1' => 'F1', 'followup_2' => 'F2', 'followup_3' => 'F3'] as $fType => $fLabel) @php $log = $order->whatsappLogs->where('template_type', $fType)->first(); @endphp @if($log) {{ $fLabel }} @endif @endforeach
@endif
{{-- WA Button --}} @if($order->work_status === 'Selesai' || $order->work_status === 'Diambil/Dikirim' || $order->work_status === 'Cancelled') @else @endif {{-- Detail --}} {{-- Ambil (hanya status Selesai) --}} @if($order->work_status === 'Selesai') @endif {{-- Hapus (SuperAdmin only) --}} @if(auth()->user()->isSuperAdmin()) @endif
Tidak ada data order
@if($orders->hasPages()) @endif
{{-- Modal Detail --}} @if($isDetailModalOpen && $selectedOrder) @endif {{-- Modal Pembayaran --}} @if($isPaymentModalOpen && $selectedOrder) @endif
@script @endscript