-
Notifications
You must be signed in to change notification settings - Fork 92
Handle foreign-country address stringification with early return in toCertificateVariables #10599
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
Conversation
|
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
174dbc6 to
72e78f5
Compare
72e78f5 to
eca152e
Compare
|
Your environment is deployed to https://ocrvs-10584.opencrvs.dev |
Zangetsu101
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some test cases would be appreciated 🙏
packages/client/src/v2-events/features/events/registered-fields/Address.tsx
Outdated
Show resolved
Hide resolved
|
You'd probably need to update |
makelicious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test case for this so regression won't happen
ee3bd07 to
48614fd
Compare
|
Test added |
|
https://github.com/opencrvs/opencrvs-core/pull/10228/files It seems that it broke here. Initially $lookup converted to the stringified form. I sugggest we change it back and write a test case so it won't happen again. Then we would not need to have
|
makelicious
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test case for this so regression won't happen
issue: #10584
country config: opencrvs/opencrvs-countryconfig#1052
Summary
This PR updates the
toCertificateVariablesfunction inAddress.tsxto handle foreign-country addresses more gracefully.Key Changes
Refactored stringifier usage
getFormDataStringifierandstringifiedResultcreation to the top of the function to avoid duplication.Added early return for foreign-country addresses
value.country !== window.config.COUNTRY, the function now returns a merged object of:streetLevelDetailsPreserved local-country logic
adminLevelHierarchyas before.Why
Impact
Checklist