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

allow information to be unspecified if reason is provided and box is … #192

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

BrandonSharratt
Copy link
Collaborator

…ticked

*Issue:*bcgov/entity#22911

Description of changes:
Api schema change to accept either what it currently does or a name and a reason for not providing the rest. UI changes to support less information being available

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

@BrandonSharratt BrandonSharratt self-assigned this Aug 26, 2024
@BrandonSharratt
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://bcregistry-btr-dev--pr-192-17a547yp.web.app

@@ -9,13 +9,18 @@
{{ item.email }}
</div>
</div>
<div v-if="item.address" class="flex">
<div
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure we dont want to display other parts of the address if there is no country in the address ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah the BcrosAddressDisplay will handle an empty country so I think this should be reverted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The problem here is the icon will show if there is no information because address will be a populated object with keys like city: '' and then the icon shows with nothing and I didn't want to add all of the parts to the v-if.

Therefore I've added a computed value with all of the bits and am using that instead

const { ownershipOrControlStatements, personStatements } = getPersonAndOwnershipAndControlStatements(sif)

for (const personS of personStatements) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this fix for some UI situation ?
Why are we deleting keys from objects that are empty ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for the api actually, because if the UI passes along '' many of the keys fail

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 it would be good to add a comment here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment added

@@ -224,7 +224,8 @@ export const getSIsFromBtrBodsSubmission = (submission: BtrFilingI): SiSchemaTyp
const oocs = _findOwnershipOrControlStatement(submission, person.statementID)
if (person && oocs) {
const si = _getSi(person, oocs, businessIdentifier)
if (si.effectiveDates.filter(date => !date.endDate).length === 0) {
const fullInfo = !(si.couldNotProvideMissingInfo && si.missingInfoReason)
Copy link
Collaborator

Choose a reason for hiding this comment

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

for full info you can check !si.couldNotProvideMissingInfo if that one is provided, the other one is mandatory.

Copy link
Collaborator

@kialj876 kialj876 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@hfekete hfekete left a comment

Choose a reason for hiding this comment

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

Thanks for changes !

@BrandonSharratt BrandonSharratt merged commit 82558f4 into bcgov:main Aug 28, 2024
17 of 18 checks passed
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.

4 participants