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

feat: add send email verification button #1445

Merged
merged 8 commits into from
Nov 22, 2024

Conversation

Chisomchima
Copy link
Member

@Chisomchima Chisomchima commented Nov 19, 2024

Implements DHIS2-18374

Description

This PR introduces functionality to allow users to initialize the email verification process from their profile page. It adheres to the outlined acceptance criteria and integrates backend communication to handle email verification requests.


Checklist

  • Added a "Verify Email" button to the user profile page, which is displayed only under specific conditions.
  • Integrated API call to the backend verify email endpoint (POST /api/account/sendEmailVerification).
  • Implemented UI feedback (spinner and disabled state) during request progress.
  • Handled request success and failure states, displaying appropriate alert messages.

@Chisomchima Chisomchima requested a review from tomzemp November 19, 2024 08:21
@Chisomchima Chisomchima self-assigned this Nov 19, 2024
@Chisomchima Chisomchima marked this pull request as draft November 19, 2024 08:22
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Nov 19, 2024

🚀 Deployed on https://pr-1445--dhis2-user-profile.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify November 19, 2024 08:23 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 19, 2024 08:38 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 19, 2024 10:01 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 20, 2024 13:01 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 21, 2024 08:16 Inactive
Copy link
Member

@tomzemp tomzemp left a comment

Choose a reason for hiding this comment

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

Looks good 😄!

I left a couple of suggestions / questions. In terms of functionality, I think just fixing the emailConfigured and the conditional display of the "Verify email" button (i.e. hide the button when email is not configured) are necessary to satisfy the ticket requirements.

src/layout/VerifyEmail.component.js Outdated Show resolved Hide resolved
src/layout/VerifyEmail.component.js Outdated Show resolved Hide resolved
src/layout/VerifyEmail.component.js Outdated Show resolved Hide resolved
src/layout/VerifyEmail.component.js Outdated Show resolved Hide resolved
src/layout/FormFields.component.js Outdated Show resolved Hide resolved
src/layout/FormFields.component.js Outdated Show resolved Hide resolved
@dhis2-bot dhis2-bot temporarily deployed to netlify November 21, 2024 16:28 Inactive
Copy link
Member

@tomzemp tomzemp left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

Do you want to remove the handleEmailVerification from src/layout/FormFields.component.js as it is not used?

@Chisomchima Chisomchima marked this pull request as ready for review November 22, 2024 14:33
@dhis2-bot dhis2-bot temporarily deployed to netlify November 22, 2024 14:34 Inactive
@Chisomchima Chisomchima merged commit 96c01c7 into master Nov 22, 2024
6 checks passed
@Chisomchima Chisomchima deleted the DHIS2-18374/verify-email-button branch November 22, 2024 14:35
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants