order popup

This commit is contained in:
Abhishek Mali
2025-11-15 10:08:43 +05:30
parent 59574fd664
commit 8b64515689
4 changed files with 253 additions and 1 deletions

View File

@@ -191,6 +191,23 @@ class AdminOrderController extends Controller
return view('admin.orders_show', compact('order', 'user'));
}
public function popup($id)
{
// Load order with items + markList
$order = Order::with(['items', 'markList'])->findOrFail($id);
// Fetch user based on markList customer_id (same as show method)
$user = null;
if ($order->markList && $order->markList->customer_id) {
$user = \App\Models\User::where('customer_id', $order->markList->customer_id)->first();
}
return view('admin.popup', compact('order', 'user'));
}
public function resetTemp()
{
session()->forget(['temp_order_items', 'mark_no', 'origin', 'destination']);