From bb6b92df100ac2a1d14326bd0c00fbabee14dad9 Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Fri, 2 Jan 2026 18:57:21 +0200 Subject: [PATCH] feat: Add Blade templates for ops QR interface (Phase 2) Create state-driven UI templates: Main Template (ops/order-detail.blade.php): - Display order summary with status, type, customer, date - Render QR code SVG for shop-floor access - Conditionally include state-specific action forms - Show order items, packing details, shipment info Action Templates: - ops/actions/packing.blade.php: Form to input weight/dimensions - ops/actions/inspection.blade.php: Pass/Fail inspection with optional notes - ops/actions/read-only.blade.php: Status display for read-only states Error Pages: - ops/order-not-found.blade.php: Invalid/expired QR token - ops/unauthorized.blade.php: Insufficient permissions All forms use AJAX submission with confirmation dialogs --- .../views/ops/actions/inspection.blade.php | 81 +++++++++++ resources/views/ops/actions/packing.blade.php | 135 ++++++++++++++++++ .../views/ops/actions/read-only.blade.php | 48 +++++++ resources/views/ops/order-detail.blade.php | 131 +++++++++++++++++ resources/views/ops/order-not-found.blade.php | 15 ++ resources/views/ops/unauthorized.blade.php | 20 +++ 6 files changed, 430 insertions(+) create mode 100644 resources/views/ops/actions/inspection.blade.php create mode 100644 resources/views/ops/actions/packing.blade.php create mode 100644 resources/views/ops/actions/read-only.blade.php create mode 100644 resources/views/ops/order-detail.blade.php create mode 100644 resources/views/ops/order-not-found.blade.php create mode 100644 resources/views/ops/unauthorized.blade.php diff --git a/resources/views/ops/actions/inspection.blade.php b/resources/views/ops/actions/inspection.blade.php new file mode 100644 index 0000000..33a7bf7 --- /dev/null +++ b/resources/views/ops/actions/inspection.blade.php @@ -0,0 +1,81 @@ + +
Quality check completed - proceed to packing
+ + +Quality issue detected - needs review
+ + + + ++ This order is in the {{ str_replace('_', ' ', ucfirst($order->status)) }} phase. + No actions are available at this stage. +
+ + @if($order->status === 'ready_to_ship') ++ Next Step: Move Trello card to "Ready to Ship" to trigger automatic shipment creation. +
++ Status: Parcel is awaiting collection from courier. +
+ @if($order->courier_waybill_id) +
+ Waybill: {{ $order->courier_waybill_id }}
+
+ Status: Parcel is in transit to the customer. +
+ @if($order->courier_tracking_number) +
+ Tracking: {{ $order->courier_tracking_number }}
+
+ The order is progressing through the fulfillment pipeline. +
+{{ $order->uuid }}
+Status
+{{ str_replace('_', ' ', $order->status) }}
+Order Type
+{{ $order->is_custom_order ? 'Custom' : 'Standard' }}
+Customer
+{{ $order->user->name ?? 'N/A' }}
+Created
+{{ $order->created_at->format('M d, Y') }}
+Scan to access this order:
+No actions available for this order status.
+| Product | +Type | +Quantity | +Amount | +
|---|---|---|---|
| {{ $item->product->name ?? 'N/A' }} | +{{ $item->product_type ?? 'N/A' }} | +{{ $item->quantity }} | +R{{ number_format($item->unit_price * $item->quantity, 2) }} | +
| No items | +|||
Width
+{{ $order->packing_width }} cm
+Length
+{{ $order->packing_length }} cm
+Weight
+{{ $order->packing_weight }} kg
+Packed At
+{{ $order->packing_completed_at->format('M d, H:i') }}
+Waybill ID
+{{ $order->courier_waybill_id }}
+Tracking Number
+{{ $order->courier_tracking_number ?? 'N/A' }}
+Status
+{{ str_replace('_', ' ', $order->courier_status ?? 'pending') }}
++ The QR code token is invalid or the order does not exist. +
+ + Return Home + ++ You do not have permission to access this page. Only operations staff can view QR-based order interfaces. +
+ @if(auth()->check()) ++ Logged in as: {{ auth()->user()->name }} +
+ @endif + + Return Home + +