-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [IOPID-991] Integration of email validation logic in the onboa…
…rding flow and profile preferences flow (#5206) ## Short description In this PR, I integrated business logic that allows the validation of the email within both the onboarding and profile editing screens. ## List of changes proposed in this pull request - business logic on the modify email in preferences `NewEmailInsertScreen.tsx` - added business logic on `NewOnboardingEmailInsertScreen.tsx` - integration of logic described in solution 2 of this [RFC](https://pagopa.atlassian.net/wiki/spaces/IAEI/pages/792166441/RFC+-+2013+Gestione+Errore+GET+e+POST+della+chiamata+API+profile+nell+UI+dell+app+IO) `ProfileErrorType.ts` - integration of the new openapi [in this PR ](pagopa/io-backend#1068) - fix accessibilityLabel on `NewOptInScreen.tsx ` ## Onboarding Flow https://github.com/pagopa/io-app/assets/83651704/4bfeab28-b01e-4ffb-af23-dd861f9f26e8 ## How to test 1. in [this line](https://github.com/pagopa/io-app/blob/8d955e2a92223c0dd1baee255df383ee84ca1545/.env.local#L101) change the value to YES 2. make sure [this branch](pagopa/io-dev-api-server#317) and[ this branch](pagopa/io-dev-api-server#321) are merged into master in [io-dev-api-server](https://github.com/pagopa/io-dev-api-server) 3. in io-dev-api-server [in this line](https://github.com/pagopa/io-dev-api-server/blob/284edc21086fe0cfae39462958c8e8114d762f04/src/config.ts#L67C4-L67C28) set `firstOnboarding: true` 4. in io-dev-api-server [at this line](https://github.com/pagopa/io-dev-api-server/blob/284edc21086fe0cfae39462958c8e8114d762f04/src/payloads/profile.ts#L49) and [at this line](https://github.com/pagopa/io-dev-api-server/blob/284edc21086fe0cfae39462958c8e8114d762f04/src/payloads/profile.ts#L74) set `is_email_validated: true`. 5. in io-dev-api-server, in the same file as the last point, set `is_email_already_taken: true` if you need to display the alert on the screen NewEmailInsertScreen. 6. run the application on io-dev-api-server 7. To check for error 412 you can enter the e-mail `mario.error@prova.com`. 8. when you get to the [verification screen](https://www.figma.com/file/oLJMcWd0SbRHDtj7WRvu7N/Univocit%C3%A0-indirizzi-email?type=design&node-id=7-10909&mode=design&t=f1xmwaHUSRRROj50-0), navigate to the browser at: http://localhost:3000/ and in the "email configuration" section press the "validate email" button 9. continue the flow. ## Change preferences flow https://github.com/pagopa/io-app/assets/83651704/e7cbaede-9fa6-4e2b-87de-5e7d3a8edd59 ## How to test Once logged in, go to your profile and select 'your data'. From here you can edit your email. The flow is almost the same as explained above (from point 7) --------- Co-authored-by: Alice Azzolini <93777761+AliceAzzolini@users.noreply.github.com> Co-authored-by: Fabio Bombardi <16268789+shadowsheep1@users.noreply.github.com> Co-authored-by: Sabino <114305019+sabontech@users.noreply.github.com> Co-authored-by: Cristiano Tofani <cri.tofani@gmail.com> Co-authored-by: Andrea Piai <andrea.piai@pagopa.it> Co-authored-by: Federico Mastrini <federicomastrini93@gmail.com> Co-authored-by: Alessandro Izzo <34343582+Hantex9@users.noreply.github.com>
- Loading branch information
1 parent
ef78c16
commit 1aeee14
Showing
17 changed files
with
500 additions
and
148 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.