Skip to content

Commit

Permalink
Merge pull request #229 from ymaheshwari1/fix/viewSize-issue
Browse files Browse the repository at this point in the history
Fixed: issue in filters not being fetched by passing pageSize param
  • Loading branch information
ymaheshwari1 authored Jun 14, 2024
2 parents c75a606 + cdab73a commit a96efec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/store/modules/orderRouting/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const actions: ActionTree<OrderRoutingState, RootState> = {
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 {
Expand Down Expand Up @@ -216,7 +217,7 @@ const actions: ActionTree<OrderRoutingState, RootState> = {
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
Expand Down
14 changes: 10 additions & 4 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const actions: ActionTree<UtilState, RootState> = {
}

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) => {
Expand Down Expand Up @@ -45,7 +48,8 @@ const actions: ActionTree<UtilState, RootState> = {
}

const payload = {
parentTypeId: "VIRTUAL_FACILITY"
parentTypeId: "VIRTUAL_FACILITY",
pageSize: 200
}

try {
Expand Down Expand Up @@ -74,7 +78,8 @@ const actions: ActionTree<UtilState, RootState> = {

// 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 {
Expand Down Expand Up @@ -102,7 +107,8 @@ const actions: ActionTree<UtilState, RootState> = {
}

const payload = {
productStoreId: store.state.orderRouting.currentGroup.productStoreId
productStoreId: store.state.orderRouting.currentGroup.productStoreId,
pageSize: 200
}

try {
Expand Down

0 comments on commit a96efec

Please sign in to comment.