feat: update enforce verified email checkbox#1414
Merged
Chisomchima merged 4 commits intomasterfrom Jan 21, 2025
Merged
Conversation
Contributor
|
🚀 Deployed on https://pr-1414--dhis2-settings.netlify.app |
tomzemp
approved these changes
Jan 20, 2025
Member
tomzemp
left a comment
There was a problem hiding this comment.
Looks good 🎊🎊
FYI: The snackbar message gets cut off when you try to enable the enforce verified emails setting without having email configured:

You could just have the button disabled in this state (the explanatory text explains why it's disabled), or you could shorten the snackbar message (maybe "Cannot update as email is not configured")
Contributor
|
🎉 This PR is included in version 100.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement Email Configuration Check for
enforceVerifiedEmailSettingDescription:
This PR introduces the following changes to the
SettingsFieldscomponent for this issue:enforceVerifiedEmailSetting Email Configuration Check:enforceVerifiedEmailis now conditionally enabled. It can only be checked (set totrue) if the system has email configuration (keyEmailHostNameandkeyEmailUserNameare both set).enforceVerifiedEmailsetting can only be set tofalse.Fixing ESLint
no-case-declarationsErrors:switchcase block in curly braces{}to resolve ESLint warnings/errors regarding lexical declarations (const,let, etc.) insideswitchstatements. This ensures proper scoping and avoids the error:Unexpected lexical declaration in case block.Motivation and Context:
enforceVerifiedEmailsetting can only be enabled when email configuration is properly set up, preventing confusion or errors if the email system is not properly configured.Changes Made:
enforceVerifiedEmailcheckbox based on the presence of email configuration (keyEmailHostNameandkeyEmailUserName).enforceVerifiedEmailto clarify that email configuration is required to enable this setting.