Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/actions/form-template-item-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const getFormTemplateItems =
createAction(RECEIVE_FORM_TEMPLATE_ITEMS),
`${window.INVENTORY_API_BASE_URL}/api/v1/form-templates/${formTemplateId}/items`,
snackbarErrorHandler,
{ order, orderDir, page, term, showArchived }
{ order, orderDir, page, perPage, term, showArchived }
)(params)(dispatch).then(() => {
dispatch(stopLoading());
});
Expand Down
2 changes: 1 addition & 1 deletion src/actions/sponsor-forms-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ export const getSponsorFormItems =
createAction(RECEIVE_SPONSOR_FORM_ITEMS),
`${window.PURCHASES_API_URL}/api/v1/summits/${currentSummit.id}/show-forms/${formId}/items`,
authErrorHandler,
{ order, orderDir, page, showArchived }
{ order, orderDir, page, perPage, showArchived }
)(params)(dispatch).then(() => {
dispatch(stopLoading());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe("SponsorFormItemsListReducer", () => {
order: "date",
orderDir: 2,
page: 10,
perPage: 50,
showArchived: true
}
});
Expand All @@ -79,6 +80,7 @@ describe("SponsorFormItemsListReducer", () => {
order: "date",
orderDir: 2,
currentPage: 10,
perPage: 50,
showArchived: true,
items: []
});
Expand Down
3 changes: 2 additions & 1 deletion src/reducers/sponsors/sponsor-form-items-list-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ const sponsorFormItemsListReducer = (state = DEFAULT_STATE, action) => {
return DEFAULT_STATE;
}
case REQUEST_SPONSOR_FORM_ITEMS: {
const { order, orderDir, page, showArchived } = payload;
const { order, orderDir, page, perPage, showArchived } = payload;

return {
...state,
order,
orderDir,
items: [],
currentPage: page,
perPage,
showArchived
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const formTemplateItemListReducer = (state = DEFAULT_STATE, action = {}) => {
return DEFAULT_STATE;
}
case REQUEST_FORM_TEMPLATE_ITEMS: {
const { order, orderDir, page, ...rest } = payload;
const { order, orderDir, page, perPage, ...rest } = payload;

if (
order !== state.order ||
Expand All @@ -53,6 +53,7 @@ const formTemplateItemListReducer = (state = DEFAULT_STATE, action = {}) => {
order,
orderDir,
currentPage: page,
perPage,
...rest
};
}
Expand All @@ -63,6 +64,7 @@ const formTemplateItemListReducer = (state = DEFAULT_STATE, action = {}) => {
orderDir,
formTemplateItems: [],
currentPage: page,
perPage,
...rest
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const inventoryItemListReducer = (state = DEFAULT_STATE, action = {}) => {
return DEFAULT_STATE;
}
case REQUEST_INVENTORY_ITEMS: {
const { order, orderDir, page, ...rest } = payload;
const { order, orderDir, page, perPage, ...rest } = payload;

if (
order !== state.order ||
Expand All @@ -62,6 +62,7 @@ const inventoryItemListReducer = (state = DEFAULT_STATE, action = {}) => {
order,
orderDir,
currentPage: page,
perPage,
...rest
};
}
Expand All @@ -72,6 +73,7 @@ const inventoryItemListReducer = (state = DEFAULT_STATE, action = {}) => {
orderDir,
inventoryItems: [],
currentPage: page,
perPage,
...rest
};
}
Expand Down
Loading