From a6cbe56f79d506eabeccc2fd5322d11f107ea8ef Mon Sep 17 00:00:00 2001 From: Icaro Oliveira Date: Tue, 20 Aug 2024 16:00:42 -0300 Subject: [PATCH 1/2] fix: update pagination selected option in Organization Details pages --- .../admin/OrganizationDetails/OrganizationDetailsCollections.tsx | 1 + .../admin/OrganizationDetails/OrganizationDetailsCostCenters.tsx | 1 + react/admin/OrganizationDetails/OrganizationDetailsSellers.tsx | 1 + react/admin/OrganizationRequestsTable.tsx | 1 + react/components/OrganizationsWithoutSalesManager.tsx | 1 + 5 files changed, 5 insertions(+) diff --git a/react/admin/OrganizationDetails/OrganizationDetailsCollections.tsx b/react/admin/OrganizationDetails/OrganizationDetailsCollections.tsx index bd4e16de..c9532141 100644 --- a/react/admin/OrganizationDetails/OrganizationDetailsCollections.tsx +++ b/react/admin/OrganizationDetails/OrganizationDetailsCollections.tsx @@ -178,6 +178,7 @@ const OrganizationDetailsCollections = ({ onNextClick: handleCollectionsNextClick, onPrevClick: handleCollectionsPrevClick, onRowsChange: handleRowsChange, + selectedOption: collectionPaginationState.pageSize, currentItemFrom: (collectionPaginationState.page - 1) * collectionPaginationState.pageSize + diff --git a/react/admin/OrganizationDetails/OrganizationDetailsCostCenters.tsx b/react/admin/OrganizationDetails/OrganizationDetailsCostCenters.tsx index f0e72c18..a8b02cd8 100644 --- a/react/admin/OrganizationDetails/OrganizationDetailsCostCenters.tsx +++ b/react/admin/OrganizationDetails/OrganizationDetailsCostCenters.tsx @@ -304,6 +304,7 @@ const OrganizationDetailsCostCenters = ({ onNextClick: handleCostCentersNextClick, onPrevClick: handleCostCentersPrevClick, onRowsChange: handleCostCentersRowsChange, + selectedOption: costCenterPaginationState.pageSize, currentItemFrom: (costCenterPaginationState.page - 1) * costCenterPaginationState.pageSize + diff --git a/react/admin/OrganizationDetails/OrganizationDetailsSellers.tsx b/react/admin/OrganizationDetails/OrganizationDetailsSellers.tsx index 44d33155..f938db31 100644 --- a/react/admin/OrganizationDetails/OrganizationDetailsSellers.tsx +++ b/react/admin/OrganizationDetails/OrganizationDetailsSellers.tsx @@ -178,6 +178,7 @@ const OrganizationDetailsSellers = ({ onNextClick: handleNext, onPrevClick: handlePrev, onRowsChange: handleRowsChange, + selectedOption: variables.pageSize, currentItemFrom: (variables.page - 1) * variables.pageSize + 1, currentItemTo: Math.min( variables.page * variables.pageSize, diff --git a/react/admin/OrganizationRequestsTable.tsx b/react/admin/OrganizationRequestsTable.tsx index 722a89de..310b3f5b 100644 --- a/react/admin/OrganizationRequestsTable.tsx +++ b/react/admin/OrganizationRequestsTable.tsx @@ -325,6 +325,7 @@ const OrganizationRequestsTable: FunctionComponent = () => { onNextClick: handleNextClick, onPrevClick: handlePrevClick, onRowsChange: handleRowsChange, + selectedOption: pageSize, currentItemFrom: (page - 1) * pageSize + 1, currentItemTo: total < page * pageSize ? total : page * pageSize, textShowRows: formatMessage(messages.showRows), diff --git a/react/components/OrganizationsWithoutSalesManager.tsx b/react/components/OrganizationsWithoutSalesManager.tsx index 6bcd8634..4b70eeb1 100644 --- a/react/components/OrganizationsWithoutSalesManager.tsx +++ b/react/components/OrganizationsWithoutSalesManager.tsx @@ -139,6 +139,7 @@ const OrganizationsWithoutSalesManager = () => { pagination={{ onNextClick: handleNextClick, onPrevClick: handlePrevClick, + selectedOption: paginationState.tableLength, currentItemFrom: paginationState.currentItemFrom, currentItemTo: paginationState.currentItemTo, onRowsChange: handleRowsChange, From cdcd27f4d2d542524413d799c73d2d550732cfee Mon Sep 17 00:00:00 2001 From: Icaro Oliveira Date: Tue, 20 Aug 2024 16:02:00 -0300 Subject: [PATCH 2/2] chore: update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f3a65a6..4d1e0b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed +- Update pagination selected option in Organization Details pages + ## [1.34.0] - 2024-08-20 ### Fixed