diff --git a/src/services/ProductStoreService.ts b/src/services/ProductStoreService.ts index a05be96..12d49bd 100644 --- a/src/services/ProductStoreService.ts +++ b/src/services/ProductStoreService.ts @@ -24,17 +24,19 @@ const fetchProductStoreDetails = async (productStoreId: any): Promise => { }); } -const fetchProductStores = async (): Promise => { +const fetchProductStores = async (payload: any): Promise => { return api({ url: "productStores", - method: "get" + method: "get", + params: payload }); } -const fetchProductStoresFacilityCount = async (): Promise => { +const fetchProductStoresFacilityCount = async (payload: any): Promise => { return api({ url: "productStores/facilities/counts", - method: "get" + method: "get", + params: payload }); } diff --git a/src/store/modules/productStore/actions.ts b/src/store/modules/productStore/actions.ts index ae9cb0e..2fbdd46 100644 --- a/src/store/modules/productStore/actions.ts +++ b/src/store/modules/productStore/actions.ts @@ -13,7 +13,7 @@ const actions: ActionTree = { let productStores = []; try { - const resp = await ProductStoreService.fetchProductStores(); + const resp = await ProductStoreService.fetchProductStores({ pageSize: 100 }); if(!hasError(resp)) { productStores = resp.data; @@ -52,7 +52,7 @@ const actions: ActionTree = { const productStoresFacilityCount = {} as any; try { - const resp = await ProductStoreService.fetchProductStoresFacilityCount(); + const resp = await ProductStoreService.fetchProductStoresFacilityCount({ pageSize: 100 }); if(!hasError(resp)) { resp.data.map((response: any) => productStoresFacilityCount[response.productStoreId] = response.facilityCount) diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts index fa1bd2e..b31c91e 100644 --- a/src/store/modules/util/actions.ts +++ b/src/store/modules/util/actions.ts @@ -65,7 +65,7 @@ const actions: ActionTree = { let productIdentifiers = [] as any; try { - const resp = await UtilService.fetchEnums({ enumTypeId: "SHOP_PROD_IDENTITY" }) + const resp = await UtilService.fetchEnums({ enumTypeId: "SHOP_PROD_IDENTITY", pageSize: 100 }) if(!hasError(resp)) { productIdentifiers = resp.data; } else {