-
Notifications
You must be signed in to change notification settings - Fork 5
[JN-1665 & JN-1668] fix invitation process for proxies and non-english enrollees #1597
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
useEffect(() => { | ||
if (profile && profile.preferredLanguage && selectedLanguage !== profile.preferredLanguage) { | ||
changeLanguage(profile.preferredLanguage) | ||
reloadPortal() | ||
} | ||
}, [profile?.preferredLanguage, selectedLanguage, changeLanguage]) | ||
|
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.
So, if you logged into a user who has never been to Juniper before, they won't have the right preferred language in session storage. It takes a full refresh for it to populate - for some reason. Everything related to managing language state seems to be a can of worms, so this was my perhaps hamfisted solution to make sure it is synced on initial load.
|
||
private String removeProxySuffix(String email) { | ||
// if the email ends with -prox-XXXX, remove it | ||
Pattern proxySuffix = Pattern.compile("-prox-[A-Z]{4}$"); |
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.
I thought about getting the email from the main account... but it made EnrolleeContext
more complicated and it's already gotten really big.
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.
Let's put this method in RegistrationService so that the correlation between it and getGovernedUsername
is more overt. (or consider moving both to a ProxyUsernameUtils
or somesuch)
|
DESCRIPTION (include screenshots, and mobile screenshots for participant UX)
Now, invitations will prefill properly for proxies. Also,
preferredLanguage
will propagate to the proxy, which will now also be maintained across the import/invitation process.TO TEST: (simple manual steps for confirming core behavior -- used for pre-release checks)
2025-04-18-enrollees.tsv.zip
(if on demo server search and replace
[email protected]
with your email)-prox-ASDF
) and in the correct language