diff --git a/src/components/pages/inventory/movement/form/MovementForm.tsx b/src/components/pages/inventory/movement/form/MovementForm.tsx index e035c53a..b6a40cc3 100644 --- a/src/components/pages/inventory/movement/form/MovementForm.tsx +++ b/src/components/pages/inventory/movement/form/MovementForm.tsx @@ -86,13 +86,6 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => { quantity: number; } - // ===== API DATA FETCHING ===== - const allProductWarehousesUrl = `${ProductWarehouseApi.basePath}`; - const { data: allProductWarehouses } = useSWR( - allProductWarehousesUrl, - ProductWarehouseApi.getAllFetcher - ); - // ===== USE SELECT HOOKS ===== const { setInputValue: setWarehouseSelectInputValue, @@ -101,6 +94,14 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => { rawData: warehouses, } = useSelect(WarehouseApi.basePath, 'id', 'name', 'search'); + const { rawData: allProductWarehouses } = useSelect( + ProductWarehouseApi.basePath, + 'id', + 'product.name', + 'search', + { limit: '100' } + ); + // ===== SELECT INPUT DATA ===== const { setInputValue: setSupplierSelectInputValue,