From ebb2bde2d2ad53d03339aae9beaf05d3d3372193 Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Thu, 25 Jul 2024 10:26:46 -0300 Subject: [PATCH 1/6] fix: [KI 921115] Cost center dropdown shows only 25 options in B2B Admin Customers --- react/components/OrganizationsAutocomplete.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/components/OrganizationsAutocomplete.tsx b/react/components/OrganizationsAutocomplete.tsx index 1b3e065..f4eacb6 100644 --- a/react/components/OrganizationsAutocomplete.tsx +++ b/react/components/OrganizationsAutocomplete.tsx @@ -11,7 +11,7 @@ const initialState = { status: ['active', 'on-hold', 'inactive'], search: '', page: 1, - pageSize: 25, + pageSize: 9999, sortOrder: 'ASC', sortedBy: 'name', } @@ -78,7 +78,7 @@ const OrganizationsAutocomplete = ({ onChange, organizationId }: Props) => { }, [data]) useEffect(() => { - if (term && term.length > 2) { + if (term && term.length > 0) { setHasChanged(true) refetch({ ...initialState, From bbd5c37e7023c3d6742bdaafabe1d08f5c707e9f Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Thu, 25 Jul 2024 10:28:12 -0300 Subject: [PATCH 2/6] doc: update change log file --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f0c1ac..7e0e059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- shows more options in the organization dropdown + ### Removed - [ENGINEERS-1247] - Disable cypress tests in PR level From 4a21e8bcf1c696703f7eea5943c167efa0d41522 Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Thu, 25 Jul 2024 10:42:10 -0300 Subject: [PATCH 3/6] fix: [KI 921115] Cost center dropdown shows only 25 options in B2B Admin Customers --- react/components/OrganizationsAutocomplete.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/components/OrganizationsAutocomplete.tsx b/react/components/OrganizationsAutocomplete.tsx index f4eacb6..3186ff7 100644 --- a/react/components/OrganizationsAutocomplete.tsx +++ b/react/components/OrganizationsAutocomplete.tsx @@ -11,7 +11,7 @@ const initialState = { status: ['active', 'on-hold', 'inactive'], search: '', page: 1, - pageSize: 9999, + pageSize: 999, sortOrder: 'ASC', sortedBy: 'name', } From 9b7dc509c6f0e3a1e9e91d00ee813ad4c7091c20 Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Thu, 25 Jul 2024 11:47:25 -0300 Subject: [PATCH 4/6] fix: [KI 921115] limits the list of organizations to 500 --- react/components/OrganizationsAutocomplete.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/components/OrganizationsAutocomplete.tsx b/react/components/OrganizationsAutocomplete.tsx index 3186ff7..512fec1 100644 --- a/react/components/OrganizationsAutocomplete.tsx +++ b/react/components/OrganizationsAutocomplete.tsx @@ -11,7 +11,7 @@ const initialState = { status: ['active', 'on-hold', 'inactive'], search: '', page: 1, - pageSize: 999, + pageSize: 500, sortOrder: 'ASC', sortedBy: 'name', } From 580df09d2c567fe22aff85957a6ae9ad32ff9d00 Mon Sep 17 00:00:00 2001 From: Josmar Junior Date: Wed, 21 Aug 2024 15:04:48 -0300 Subject: [PATCH 5/6] Update CHANGELOG.md Co-authored-by: Enzo Mercanti <131273915+enzomerca@users.noreply.github.com> --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e0e059..c0ff53e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -- shows more options in the organization dropdown +### Fixed +- shows more options in the cost centers dropdown ### Removed - [ENGINEERS-1247] - Disable cypress tests in PR level From 0f92ba78bfd46fdfd0ba4528fd38b2a8a81c099d Mon Sep 17 00:00:00 2001 From: Josmar Soares Trigueiro Junior Date: Wed, 21 Aug 2024 15:10:09 -0300 Subject: [PATCH 6/6] fix: increase length for search --- react/components/OrganizationsAutocomplete.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/components/OrganizationsAutocomplete.tsx b/react/components/OrganizationsAutocomplete.tsx index 512fec1..7359d64 100644 --- a/react/components/OrganizationsAutocomplete.tsx +++ b/react/components/OrganizationsAutocomplete.tsx @@ -78,7 +78,7 @@ const OrganizationsAutocomplete = ({ onChange, organizationId }: Props) => { }, [data]) useEffect(() => { - if (term && term.length > 0) { + if (term && term.length > 1) { setHasChanged(true) refetch({ ...initialState,