From 6977c59b69694dfd6609a4253a03182bec694b3c Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 14 Jun 2024 18:10:15 +0530 Subject: [PATCH 1/2] Fixed: issue in filters not being fetched by passing pageSize param --- src/store/modules/util/actions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts index 70babdb..62d21b8 100644 --- a/src/store/modules/util/actions.ts +++ b/src/store/modules/util/actions.ts @@ -15,7 +15,10 @@ const actions: ActionTree = { } try { - const resp = await UtilService.fetchEnums(payload); + const resp = await UtilService.fetchEnums({ + ...payload, + pageSize: 500 + }); if(!hasError(resp) && resp.data.length) { enums = resp.data.reduce((enumerations: any, data: EnumerationAndType) => { From cdab73ac0e91d68d146f57f716e774045a70b0c6 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 14 Jun 2024 18:17:18 +0530 Subject: [PATCH 2/2] Improved: api calls to include pageSize param in get requests --- src/store/modules/orderRouting/actions.ts | 5 +++-- src/store/modules/util/actions.ts | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/store/modules/orderRouting/actions.ts b/src/store/modules/orderRouting/actions.ts index 6638e1b..c40d4af 100644 --- a/src/store/modules/orderRouting/actions.ts +++ b/src/store/modules/orderRouting/actions.ts @@ -15,7 +15,8 @@ const actions: ActionTree = { let routingGroups = [] as any; // filter groups on the basis of productStoreId const payload = { - productStoreId: store.state.user.currentEComStore.productStoreId + productStoreId: store.state.user.currentEComStore.productStoreId, + pageSize: 200 } try { @@ -216,7 +217,7 @@ const actions: ActionTree = { let routingHistory = {} try { - const resp = await OrderRoutingService.fetchRoutingHistory(routingGroupId, { orderByField: "startDate DESC" }) + const resp = await OrderRoutingService.fetchRoutingHistory(routingGroupId, { orderByField: "startDate DESC", pageSize: 500 }) if(!hasError(resp)) { // Sorting the history based on startTime, as we does not get the records in sorted order from api diff --git a/src/store/modules/util/actions.ts b/src/store/modules/util/actions.ts index 62d21b8..9c0e6d8 100644 --- a/src/store/modules/util/actions.ts +++ b/src/store/modules/util/actions.ts @@ -48,7 +48,8 @@ const actions: ActionTree = { } const payload = { - parentTypeId: "VIRTUAL_FACILITY" + parentTypeId: "VIRTUAL_FACILITY", + pageSize: 200 } try { @@ -77,7 +78,8 @@ const actions: ActionTree = { // Fetching shipping methods for productStore of the currentGroup const payload = { - productStoreId: store.state.orderRouting.currentGroup.productStoreId + productStoreId: store.state.orderRouting.currentGroup.productStoreId, + pageSize: 200 } try { @@ -105,7 +107,8 @@ const actions: ActionTree = { } const payload = { - productStoreId: store.state.orderRouting.currentGroup.productStoreId + productStoreId: store.state.orderRouting.currentGroup.productStoreId, + pageSize: 200 } try {