feat: 統一清單頁面分頁與每頁顯示 UI
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 1m11s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-13 17:09:52 +08:00
parent f18fb169f3
commit 566dfa31ae
7 changed files with 131 additions and 66 deletions

View File

@@ -43,11 +43,12 @@ class PurchaseOrderController extends Controller
$query->orderBy($sortField, $sortDirection);
}
$orders = $query->paginate(15)->withQueryString();
$perPage = $request->input('per_page', 10);
$orders = $query->paginate($perPage)->withQueryString();
return Inertia::render('PurchaseOrder/Index', [
'orders' => $orders,
'filters' => $request->only(['search', 'status', 'warehouse_id', 'sort_field', 'sort_direction']),
'filters' => $request->only(['search', 'status', 'warehouse_id', 'sort_field', 'sort_direction', 'per_page']),
'warehouses' => Warehouse::all(['id', 'name']),
]);
}