feat: 統一清單頁面分頁與每頁顯示 UI
This commit is contained in:
@@ -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']),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user