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

@@ -36,13 +36,15 @@ class VendorController extends Controller
$sortDirection = 'desc';
}
$perPage = $request->input('per_page', 10);
$vendors = $query->orderBy($sortField, $sortDirection)
->paginate(10)
->paginate($perPage)
->withQueryString();
return \Inertia\Inertia::render('Vendor/Index', [
'vendors' => $vendors,
'filters' => $request->only(['search', 'sort_field', 'sort_direction']),
'filters' => $request->only(['search', 'sort_field', 'sort_direction', 'per_page']),
]);
}