refactor(FE): Add default page/limit to location and flock queries

This commit is contained in:
rstubryan
2026-01-05 13:46:21 +07:00
parent 62b05bf9c0
commit d7ef86e24b
@@ -97,12 +97,16 @@ const UniformityForm = ({
setInputValue: setLocationSelectInputValue,
options: locationOptions,
isLoadingOptions: isLoadingLocations,
} = useSelect(LocationApi.basePath, 'id', 'name', 'search');
} = useSelect(LocationApi.basePath, 'id', 'name', 'search', {
page: '1',
limit: '100',
});
// ===== FETCH PROJECT FLOCKS DATA =====
const projectFlocksUrl = useMemo(() => {
const params = new URLSearchParams({
search: projectFlockSearchValue || '',
page: '1',
limit: '100',
});
if (selectedLocation) {
@@ -141,6 +145,7 @@ const UniformityForm = ({
const approvedProjectFlockKandangsUrl = useMemo(() => {
const params = new URLSearchParams({
step_name: 'Disetujui',
page: '1',
limit: '100',
});
return `${ProjectFlockKandangApi.basePath}?${params.toString()}`;