Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20989 - Exclude USA conditionally #254

Merged
merged 2 commits into from
May 7, 2024
Merged

20989 - Exclude USA conditionally #254

merged 2 commits into from
May 7, 2024

Conversation

ketaki-deodhar
Copy link
Collaborator

@ketaki-deodhar ketaki-deodhar commented May 7, 2024

Issue #: /bcgov/entity#20989

Description of changes:

  • new function to exclude USA conditionally
  • pass newly created function to filter call

Changed header text to 'USA' for Testing only. Does not have United Sates in the International jurisdiction list anymore:

image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

@ketaki-deodhar ketaki-deodhar marked this pull request as ready for review May 7, 2024 22:36
@ketaki-deodhar
Copy link
Collaborator Author

@severinbeauvais thanks for spotting this bug.

@ketaki-deodhar ketaki-deodhar self-assigned this May 7, 2024
Copy link
Collaborator

@JazzarKarim JazzarKarim left a comment

Choose a reason for hiding this comment

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

👍 👍

}

return excludedValues
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whoa, this gets called for every item in the Intl list. And it does a lot of work.

Try something simpler.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you only need a simple conditional here that returns False if filter should exclude it, else True.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good.

@severinbeauvais severinbeauvais merged commit 6b9ef8f into main May 7, 2024
4 checks passed
@severinbeauvais
Copy link
Collaborator

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants