Skip to content

PSP-11443 : File/Project list views do not filter by the users regions for the initial search#5289

Merged
asanchezr merged 5 commits intobcgov:devfrom
eddherrera:psp-11443
Apr 22, 2026
Merged

PSP-11443 : File/Project list views do not filter by the users regions for the initial search#5289
asanchezr merged 5 commits intobcgov:devfrom
eddherrera:psp-11443

Conversation

@eddherrera
Copy link
Copy Markdown
Collaborator

No description provided.

@eddherrera eddherrera requested a review from asanchezr April 21, 2026 21:27
@eddherrera eddherrera self-assigned this Apr 21, 2026
@eddherrera eddherrera added the bug Something isn't working label Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289

@github-actions
Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289

}, [formattedGuid, retrieveUserInfo]);

useEffect(() => {
if (userRegionsOptions === null && retrieveUserInfoResponse && pimsRegionsTypes) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this block seems to be repeated a few times, could this be placed in a reusable method?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we normally use exists(x) for these sorts of checks.

return { id: x.code as string, text: x.label };
}) ?? [];
setUserRegionsOptions(userRegionsOptions ?? []);
setFilter(new AcquisitionFilterModel(userRegionsOptions).toApi());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be the only difference between duplicated sections.

}, [formattedGuid, retrieveUserInfo]);

useEffect(() => {
if (userRegionsOptions === null && retrieveUserInfoResponse && pimsRegionsTypes) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit" use exists() for null checks

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289

@asanchezr asanchezr enabled auto-merge April 21, 2026 23:50
@asanchezr asanchezr added this pull request to the merge queue Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289

Merged via the queue into bcgov:dev with commit c7ddfeb Apr 22, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants