@extends('layouts.app') @section('title', 'Production Dashboard') @section('content')

Production Dashboard

Manage orders from printing to completion

Quick Scan AWB

Scan airway bill barcode to mark order as packed

@csrf
@if(request('search') || request('date_from') || request('date_to')) Clear Filters @endif @if(request('search') || request('date_from') || request('date_to'))
Active filters: @if(request('search')) Search: "{{ request('search') }}" @endif @if(request('date_from')) From: {{ request('date_from') }} @endif @if(request('date_to')) To: {{ request('date_to') }} @endif
@endif
@if(count($orders) > 0) @if($currentStatus === 'packed')
@csrf @endif
@if($currentStatus === 'packed') @endif
@if($currentStatus === 'packed') @endif @foreach($orders as $order) @if($currentStatus === 'packed') @endif @endforeach
Order ID Customer Name Address Items (SKU x Qty) Created Actions
#{{ $order->order_number }}
{{ $order->global_order_id }}
{{ $order->customer_name }}
{{ $order->customer_phone }}
{{ $order->delivery_address }}
@foreach($order->items as $item) {{ $item->product_sku }} x{{ $item->quantity }} @endforeach
{{ \Carbon\Carbon::parse($order->date_created)->format('M d, Y') }}
{{ \Carbon\Carbon::parse($order->date_created)->format('H:i') }}
@if($currentStatus === 'pending') @csrf @elseif($currentStatus === 'packed')
@if($order->packed_at)
{{ $order->packed_by_name ?? 'Staff' }}
{{ \Carbon\Carbon::parse($order->packed_at)->format('M d, H:i') }}
@endif
@php $userRoles = $user['roles'] ?? []; $canUndo = in_array('admin', $userRoles) || in_array('manager', $userRoles); @endphp @if($canUndo) @endif
@else
@if($order->packed_at)
{{ $order->packed_by_name ?? 'Staff' }}
Packed: {{ \Carbon\Carbon::parse($order->packed_at)->format('M d, H:i') }}
@endif @if($order->completed_at)
Completed: {{ \Carbon\Carbon::parse($order->completed_at)->format('M d, H:i') }}
@endif
@endif
{{ $orders->appends(['status' => $currentStatus, 'per_page' => request('per_page', 25)])->links() }}
@if($currentStatus === 'packed') @endif @else

No orders in {{ $tabs[$currentStatus]['label'] ?? '' }}

@if($currentStatus === 'pending') All orders have been packed. Great work! @elseif($currentStatus === 'packed') No packed orders waiting for completion. @else No completed orders yet. @endif

@endif
Showing {{ count($orders) }} {{ Str::plural('order', count($orders)) }} in {{ $tabs[$currentStatus]['label'] }}
Last updated: {{ now()->format('M d, Y H:i') }}
@endsection