fix: Add datetime casts to Order model and null check in view

- Add casts array to Order model for packing_completed_at, delivered_at, qr_generated_at
- Update ops order-detail view to safely handle null packing_completed_at
- Prevents 'Call to a member function format() on string' error
This commit is contained in:
twotalesanimation
2026-01-02 21:29:12 +02:00
parent 22dfb12948
commit 027278c216
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -108,7 +108,7 @@
</div>
<div>
<p class="text-sm text-gray-600">Packed At</p>
<p class="text-lg font-semibold">{{ $order->packing_completed_at->format('M d, H:i') }}</p>
<p class="text-lg font-semibold">{{ $order->packing_completed_at ? $order->packing_completed_at->format('M d, H:i') : 'Not packed' }}</p>
</div>
</div>
</div>