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

[EP-2362] Save contact info after sign up #1130

Open
wants to merge 5 commits into
base: 2362-okta
Choose a base branch
from

Conversation

canac
Copy link
Contributor

@canac canac commented Jan 8, 2025

Changes

  • Replace the onStateChange binding with dedicated onSignUp and onSignIn bindings
  • After sign up, use the order service to save the donor details to the user's account. If saving fails, show the contact info form with the fields from sign up pre-populated.

I made this a PR instead of committing directly so it's easier for you to see what changed and see if I'm going in the right direction with this.

@canac canac requested a review from dr-bizz January 8, 2025 20:40
@canac canac self-assigned this Jan 8, 2025
Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

It looks great! I have a few questions, but I don't want to block you so I will approve the PR.

@@ -1,4 +1,4 @@
<contact-info submitted="$ctrl.submitted" on-submit="$ctrl.onSubmit(success)"></contact-info>
<contact-info submitted="$ctrl.submitted" on-submit="$ctrl.onSubmit(success)" donor-details="$ctrl.signUpDonorDetails"></contact-info>
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is signUpDonorDetails defined? Were you also meant to commit changes to the contactInfoModal.component.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is set in checkDonorDetails if there was an error saving the donor details

Comment on lines +34 to +35
on-sign-up="$ctrl.onSignUp(donorDetails)"
on-sign-in="$ctrl.onSignIn()"
Copy link
Contributor

Choose a reason for hiding this comment

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

You also need to update the file src/common/services/session/sessionModal.tpl.html as signUpModal is also used there

@@ -148,13 +148,36 @@ class SignUpModalController {
}
onSuccess(postData)
}
},
// TODO: make sure that this callback is only called after the sign up completes successfully
postSubmit: (postData, onSuccess) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is fired after the Registration API is fired to Okta, but before registration is completed. I think that is okay, bt as you said, we will need to check

src/common/components/signUpModal/signUpModal.component.js Outdated Show resolved Hide resolved
@canac canac force-pushed the 2362-okta-save-contact-info branch from e146d50 to 5efb9d2 Compare January 9, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants