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

Add form validation to email in registration #290

Merged

Conversation

thywang
Copy link
Contributor

@thywang thywang commented Jul 24, 2023

Notion ticket link

Add form validation to verify valid email during registration

Implementation description

  • Add regex check using existing email checking that matches with basic email addresses

Steps to test

  1. Start the register flow to signup for a camp
  2. When on Personal Info page, fill out necessary information except email in Primary Contact
  3. Try:
  • leaving Email field blank and click Next -> verify error message "Form does not pass validation" pops up
  • enter a random sequence of characters in Email field and click Next -> verify error message "Form does not pass validation" pops up
  • enter [email protected] and click Next -> verify error message "Form does not pass validation" pops up
  • enter user.@com and click Next -> verify error message "Form does not pass validation" pops up
  • enter user.@c@om and click Next -> verify error message "Form does not pass validation" pops up
  • enter user@com and click Next -> verify error message "Form does not pass validation" pops up
  • enter a valid email in Email field and click Next -> verify successfully loads Additional Info page

What should reviewers focus on?

  • Error is displayed when email address is of invalid format
  • Can't proceed to next page when email address is of invalid format
  • Same behaviour for other email fields (e.g. Secondary Contact)

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@thywang thywang temporarily deployed to fon-preview July 24, 2023 23:28 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Jul 24, 2023

Visit the preview URL for this PR (updated for commit ca0cabc):

https://focus-on-nature--pr290-tina-add-form-valida-k1lz7pjr.web.app

(expires Tue, 08 Aug 2023 01:10:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0aeb3dd1cc2aa82265739c366a8befd0d956fd1f

@thywang thywang changed the title feat: add regex check to validate email Add form validation to email in registration Jul 24, 2023
@thywang thywang marked this pull request as draft July 24, 2023 23:38
@thywang thywang marked this pull request as ready for review July 24, 2023 23:51
Copy link
Contributor

@williamtran10 williamtran10 left a comment

Choose a reason for hiding this comment

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

There are two cases in the code where the following is found:

export const checkEmail = (email: string): boolean => {
  const emailRegex = new RegExp("[a-z0-9]+@[a-z]+\\.[a-z]{2,3}");
  return emailRegex.test(email);
};

How does your code differ and should we update those other checkEmail functions?

@thywang
Copy link
Contributor Author

thywang commented Aug 1, 2023

Thanks, that's a great point. Upon testing with several inputs, it seems they work the same for general email checking purposes. It wouldn't make sense for them to be different -- I've updated the one in the latest commit to use the existing function.

@thywang thywang temporarily deployed to fon-preview August 1, 2023 01:06 — with GitHub Actions Inactive
Copy link
Contributor

@williamtran10 williamtran10 left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge.

@BraydenRoyston BraydenRoyston merged commit 5035561 into dev Aug 1, 2023
3 checks passed
BraydenRoyston added a commit that referenced this pull request Oct 30, 2023
* Refactor: Updates invite link in waitlist registration email #244

* Feat: Waitlist registration entry  (#237)

* Feat: Add personal info and emergency contact questions step1 (#238)

* Review Registration Personal Info (#223)

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Lint

* Add visited verification on review summary page.

* Add new dependency after resolving merge conflict.

* Address comments

* Registrant Experience: Review Information Step (Additional Info) (#246)

* Add and implement EditCardHeader

* Edit styles in additional question groups to support responsiveness

* Add additional info edit card and edit prop names for consistency

* Make all styles consistent.

* Lint

* Add error validation on save

* Add image upload to camp creation (#224)

* Add image upload to camp creation

* aspect ratio fixes

* Add error handling so that when a user tries to click next, errors are shown (if any).

Co-authored-by: twilkhoo <[email protected]>

* Fix: Safari time picker (#248)

* fix: require province to proceed (#252)

* Fix: camp creation validator logic (#249)

* Fix: camp creation validator logic

* Add EDLP logic

* Fix merge conflict error with the VStack

Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>

* Move campers modal (#247)

* update 'updateCamperByids' to allow moving between sessions

* very rough draft of full implementation

* remove console.log + added deleteActionCleanUp to reset the selected camper

* yarn fix + fix unimported components + remove console.log

* yarn for backend

* add check to find earliest and latest session date

* Lint

* Fix cancel button logic

* Lint + var rename

* styling changes + change html to chakra comps

Co-authored-by: twilkhoo <[email protected]>

* fix: session date ordering, hide completed sessions (#245)

* fix: session date ordering, hide completed sessions

* more ordering

* ordering and loading states

* Fix: Call Remove waitlisted camper only once (#255)

* Commit all changes

* Close before processing for deleting a camp also.

* Add wait list step 1 (#219)

* rebasing 'change routes to load waitlist registration + implement waitlist registration pages'

* fix age display

* remove generic footer + edit & use waitlist footer + shrink page top padding

* revert changes to formatSessionInfo back to what was in dev

* fix failed checkout url redirect bug

* Registrant Experience: Review Information Step (Add PersonalInfo and EmergencyContactQuestionsto EditCamperCard/ContactCard components) (#254)

* Commit all changes

* Remove spacer to make styles consistent

* Lint.

* Fix: Display EDLP tag applicable to a session (#258)

* Commit changes

* Address changes

* add check to ensure that at least one multiple choice option has text (#259)

* add check to ensure that at least one multiple choice option has text

* lint

* remove console.log

* Add error handling for whitespace options and require at least two options for multiple choice

---------

Co-authored-by: twilkhoo <[email protected]>

* Resolve error when registering for non-existant camp (#260)

* Commit changes

* Lint

* Add notFound comment.

* Lint.

* Waitlist backend call (#262)

* added adding waitlist campers call to the frontend

* use error message from backend api for registering waitlist camper

* run lint

* err msg change + variable name change

* Add "and" and period.

---------

Co-authored-by: twilkhoo <[email protected]>

* Registrant Experience: Review Information Step (EDLP) (#263)

* Commit all changes.

* Change type of setRequireEdlp to use React.Dispatch.

* Commit all changes. (#266)

* Fix camper edit functionality (#264)

* Commit all changes.

* Fix clicking a camper twice.

* Commit all changes. (#265)

* Add legacy openssl flag to build command (#271)

* Add a temp comment to track status before updating deps.

* Update react-scripts to v5 and test.

* Try using a legacy openssl flag to work around the conflicting hash error.

* Resolve uncaught error when viewing camp and fix coordinator/counsellor/volunteer editing (#267)

* Commit all changes.

* Create another endpoint for when we want to create new camp sessions.

* Consolidate changes into one endpoint.

* Fix: Manage sessions doesn’t persist. (#268)

* Add fields in schema to sort waitlisted campers (by date created). (#269)

* fix: docker build failing on old line (#272)

* fix: prevent duplicate multiple choice (#273)

* fix: prevent duplicates in multiple choice

* refactor: use enum for option error handling

* style: more descriptive names and clean up eslint warnings

* fix: Add current session date validation on camp creation flow (#274)

* added error message when trying to move to next page with no dates selected in session camp card

* fix: frontend lint fixes

* fix: PR Feeback

---------

Co-authored-by: Derrick Yang <[email protected]>

* Aaron/fix email validation (#277)

* feat: added two email verification tests

* feat: initial code for deep email validation check

* fix: removed deep-email-validator logic

* fix: removed deep-email-validator imports

* bug: removed unneeded dependencies and package bug

* feat: camper selection frontend (#281)

* feat: WIP, homepage of CamperCancellationRefund flow

* feat: WIP rough in refund page and component

* feat: WIP design layout of cancellation card

* feat: add RefundDTO

* feat: add refund dummy endpoint

* fix: lint

* fix: CSS

* feat: WIP hooked up backend

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: syntax fix to use map function for refund card

* feat: WIP, added information according to backend data onto CamperRefundInfoCards

* fix: added start/end time

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: WIP EDLP Time and grouping sessions based on name

Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: Added EDLP Time calculation

* fix: unneeded syntax

* fix: remove console log

* fix: formatting for multiplace instances

* fix: vstack width

* feat: disabled state for when first session is < 30 days

* fix: lint

* feat: added refundCode to URL

* fix: PR feedback

---------

Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: add refund link generation (#276)

 * feature: unique refund link generation

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>

* Setup Stripe webhooks (#250)

* Setup Stripe webhooks

---------

Co-authored-by: Nathan <[email protected]>

* fix: sorted session dates in registration emails (#278)

* fix: sorted session dates in registration emails

* bug: fixed linting issue with return

* fix: allow user to deselect multiselect options containing commas (#279)

* feat: batch process camper cancellations (#282)

* feat: batch process camper cancellations

* fix: allow user to change from short answer to multiple choice with rendered default option (#283)

* chore: fix lint (#284)

* Nathan tina/add discount amount to confirmation email (#286)

* Add discount amount to confirmation email (Nathan/Tina)

---------

Co-authored-by: Tina <[email protected]>

* feat: add check for registrationResult (#288)

* fix: refund cancellation fix updates (#289)

* fix: Code readibility and frontend fixes

Co-authored-by: Catherine Xie <[email protected]>

* fix: removed error

* fix: Added total refund at the bottom

* fix: Remove EDLP if it's 0$

* fix: WIP redirect when given wrong refund code

* fix: error handled gracefully from API

* feat: Added spinner styling when loading:

* fix: linting

* fix: textStyle for dynamic page sizing

* fix: button sizing for dynamic page size

* fix: linting

* fix: lint

* fix: Linting

* fix: Address PR Comments

* fix: Address PR Comments

* fix: Removed any warning by adding type

* fix: linting fix

* fix: linting fix

* fix: deleted unexpected console statement

---------

Co-authored-by: Derrick Yang <[email protected]>

* Add form validation to email in registration (#290)

* feat: add regex check to validate email

* fix: use existing checkEmail function

* Catherine derrick/error banner and coupon display (#296)

* feat: Added endpoint to retrieve discount info from stripe checkout session chargeId

* feat: Added frontend code to display refund amount, if any

* feat: Added error banner if cards are disabled

* feat: Refactored code so total refund changes based on selected cards

* feat: Added disable logic for button in the footer

* fix: linting

* fix: PR feedback - fixed negative discount total refund

* fix: PR feedback - distribute discount to be proportional to selected refund cards

* fix: linting

---------

Co-authored-by: Catherine Xie <[email protected]>

* feat: add validation for non-negative EDLP amount (#294)

* feat: add validation for non-negative EDLP amount

* fix: lint

* feat[BE]: add user refund flow (#291)

* feat: batch process camper cancellations

* feat: factor out Stripe refund creation

* refactor: use Promise all instead of await in loop

* feat: added new field "refundStatus" to camper obj

* fix: add refundstatus field for camp+camperservice

* fix: add refundStatus in more objects

* fix: changed variable names and refund status

* chore: changed "Not Refunded" status to "Paid"

* feat: added new field paymentintentid to camper

* fix: edit camper object with paymentintentid

* fix: included paymentintentid in cancellation func

* brayden/webhook integration

* fix: remove paymentintent, change cancel flow

* fix: fixed stripe api bug

* fix: patched refundstatus not updating in db

* fix: linting fixes

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* Derrick catherine/send data on request refund (#295)

* fix: add empty dep array so useEffect is only called once

* Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added loading for requestRefund button

* fix: lint

* fix: margin adjustment

* chore: lint

---------

Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* feat[FE]: add refund confirmation page (#293)

* feat: add refund confirmation page

---------

Co-authored-by: BraydenRoyston <[email protected]>

---------

Co-authored-by: Dhruv Mittal <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>
Co-authored-by: e-wai <[email protected]>
Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: TW1234567 <[email protected]>
Co-authored-by: Ivan Yu <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: thywang <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Acezhang09 <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
BraydenRoyston added a commit that referenced this pull request Nov 4, 2023
* Refactor: Updates invite link in waitlist registration email #244

* Feat: Waitlist registration entry  (#237)

* Feat: Add personal info and emergency contact questions step1 (#238)

* Review Registration Personal Info (#223)

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Lint

* Add visited verification on review summary page.

* Add new dependency after resolving merge conflict.

* Address comments

* Registrant Experience: Review Information Step (Additional Info) (#246)

* Add and implement EditCardHeader

* Edit styles in additional question groups to support responsiveness

* Add additional info edit card and edit prop names for consistency

* Make all styles consistent.

* Lint

* Add error validation on save

* Add image upload to camp creation (#224)

* Add image upload to camp creation

* aspect ratio fixes

* Add error handling so that when a user tries to click next, errors are shown (if any).

Co-authored-by: twilkhoo <[email protected]>

* Fix: Safari time picker (#248)

* fix: require province to proceed (#252)

* Fix: camp creation validator logic (#249)

* Fix: camp creation validator logic

* Add EDLP logic

* Fix merge conflict error with the VStack

Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>

* Move campers modal (#247)

* update 'updateCamperByids' to allow moving between sessions

* very rough draft of full implementation

* remove console.log + added deleteActionCleanUp to reset the selected camper

* yarn fix + fix unimported components + remove console.log

* yarn for backend

* add check to find earliest and latest session date

* Lint

* Fix cancel button logic

* Lint + var rename

* styling changes + change html to chakra comps

Co-authored-by: twilkhoo <[email protected]>

* fix: session date ordering, hide completed sessions (#245)

* fix: session date ordering, hide completed sessions

* more ordering

* ordering and loading states

* Fix: Call Remove waitlisted camper only once (#255)

* Commit all changes

* Close before processing for deleting a camp also.

* Add wait list step 1 (#219)

* rebasing 'change routes to load waitlist registration + implement waitlist registration pages'

* fix age display

* remove generic footer + edit & use waitlist footer + shrink page top padding

* revert changes to formatSessionInfo back to what was in dev

* fix failed checkout url redirect bug

* Registrant Experience: Review Information Step (Add PersonalInfo and EmergencyContactQuestionsto EditCamperCard/ContactCard components) (#254)

* Commit all changes

* Remove spacer to make styles consistent

* Lint.

* Fix: Display EDLP tag applicable to a session (#258)

* Commit changes

* Address changes

* add check to ensure that at least one multiple choice option has text (#259)

* add check to ensure that at least one multiple choice option has text

* lint

* remove console.log

* Add error handling for whitespace options and require at least two options for multiple choice

---------

Co-authored-by: twilkhoo <[email protected]>

* Resolve error when registering for non-existant camp (#260)

* Commit changes

* Lint

* Add notFound comment.

* Lint.

* Waitlist backend call (#262)

* added adding waitlist campers call to the frontend

* use error message from backend api for registering waitlist camper

* run lint

* err msg change + variable name change

* Add "and" and period.

---------

Co-authored-by: twilkhoo <[email protected]>

* Registrant Experience: Review Information Step (EDLP) (#263)

* Commit all changes.

* Change type of setRequireEdlp to use React.Dispatch.

* Commit all changes. (#266)

* Fix camper edit functionality (#264)

* Commit all changes.

* Fix clicking a camper twice.

* Commit all changes. (#265)

* Add legacy openssl flag to build command (#271)

* Add a temp comment to track status before updating deps.

* Update react-scripts to v5 and test.

* Try using a legacy openssl flag to work around the conflicting hash error.

* Resolve uncaught error when viewing camp and fix coordinator/counsellor/volunteer editing (#267)

* Commit all changes.

* Create another endpoint for when we want to create new camp sessions.

* Consolidate changes into one endpoint.

* Fix: Manage sessions doesn’t persist. (#268)

* Add fields in schema to sort waitlisted campers (by date created). (#269)

* fix: docker build failing on old line (#272)

* fix: prevent duplicate multiple choice (#273)

* fix: prevent duplicates in multiple choice

* refactor: use enum for option error handling

* style: more descriptive names and clean up eslint warnings

* fix: Add current session date validation on camp creation flow (#274)

* added error message when trying to move to next page with no dates selected in session camp card

* fix: frontend lint fixes

* fix: PR Feeback

---------

Co-authored-by: Derrick Yang <[email protected]>

* Aaron/fix email validation (#277)

* feat: added two email verification tests

* feat: initial code for deep email validation check

* fix: removed deep-email-validator logic

* fix: removed deep-email-validator imports

* bug: removed unneeded dependencies and package bug

* feat: camper selection frontend (#281)

* feat: WIP, homepage of CamperCancellationRefund flow

* feat: WIP rough in refund page and component

* feat: WIP design layout of cancellation card

* feat: add RefundDTO

* feat: add refund dummy endpoint

* fix: lint

* fix: CSS

* feat: WIP hooked up backend

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: syntax fix to use map function for refund card

* feat: WIP, added information according to backend data onto CamperRefundInfoCards

* fix: added start/end time

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: WIP EDLP Time and grouping sessions based on name

Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: Added EDLP Time calculation

* fix: unneeded syntax

* fix: remove console log

* fix: formatting for multiplace instances

* fix: vstack width

* feat: disabled state for when first session is < 30 days

* fix: lint

* feat: added refundCode to URL

* fix: PR feedback

---------

Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: add refund link generation (#276)

 * feature: unique refund link generation

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>

* Setup Stripe webhooks (#250)

* Setup Stripe webhooks

---------

Co-authored-by: Nathan <[email protected]>

* fix: sorted session dates in registration emails (#278)

* fix: sorted session dates in registration emails

* bug: fixed linting issue with return

* fix: allow user to deselect multiselect options containing commas (#279)

* feat: batch process camper cancellations (#282)

* feat: batch process camper cancellations

* fix: allow user to change from short answer to multiple choice with rendered default option (#283)

* chore: fix lint (#284)

* Nathan tina/add discount amount to confirmation email (#286)

* Add discount amount to confirmation email (Nathan/Tina)

---------

Co-authored-by: Tina <[email protected]>

* feat: add check for registrationResult (#288)

* fix: refund cancellation fix updates (#289)

* fix: Code readibility and frontend fixes

Co-authored-by: Catherine Xie <[email protected]>

* fix: removed error

* fix: Added total refund at the bottom

* fix: Remove EDLP if it's 0$

* fix: WIP redirect when given wrong refund code

* fix: error handled gracefully from API

* feat: Added spinner styling when loading:

* fix: linting

* fix: textStyle for dynamic page sizing

* fix: button sizing for dynamic page size

* fix: linting

* fix: lint

* fix: Linting

* fix: Address PR Comments

* fix: Address PR Comments

* fix: Removed any warning by adding type

* fix: linting fix

* fix: linting fix

* fix: deleted unexpected console statement

---------

Co-authored-by: Derrick Yang <[email protected]>

* Add form validation to email in registration (#290)

* feat: add regex check to validate email

* fix: use existing checkEmail function

* Catherine derrick/error banner and coupon display (#296)

* feat: Added endpoint to retrieve discount info from stripe checkout session chargeId

* feat: Added frontend code to display refund amount, if any

* feat: Added error banner if cards are disabled

* feat: Refactored code so total refund changes based on selected cards

* feat: Added disable logic for button in the footer

* fix: linting

* fix: PR feedback - fixed negative discount total refund

* fix: PR feedback - distribute discount to be proportional to selected refund cards

* fix: linting

---------

Co-authored-by: Catherine Xie <[email protected]>

* feat: add validation for non-negative EDLP amount (#294)

* feat: add validation for non-negative EDLP amount

* fix: lint

* feat[BE]: add user refund flow (#291)

* feat: batch process camper cancellations

* feat: factor out Stripe refund creation

* refactor: use Promise all instead of await in loop

* feat: added new field "refundStatus" to camper obj

* fix: add refundstatus field for camp+camperservice

* fix: add refundStatus in more objects

* fix: changed variable names and refund status

* chore: changed "Not Refunded" status to "Paid"

* feat: added new field paymentintentid to camper

* fix: edit camper object with paymentintentid

* fix: included paymentintentid in cancellation func

* brayden/webhook integration

* fix: remove paymentintent, change cancel flow

* fix: fixed stripe api bug

* fix: patched refundstatus not updating in db

* fix: linting fixes

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* Derrick catherine/send data on request refund (#295)

* fix: add empty dep array so useEffect is only called once

* Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added loading for requestRefund button

* fix: lint

* fix: margin adjustment

* chore: lint

---------

Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* feat[FE]: add refund confirmation page (#293)

* feat: add refund confirmation page

---------

Co-authored-by: BraydenRoyston <[email protected]>

* hotfix[users cannot sign in]: fix for pre-existing cors issue on prod that client encountered

---------

Co-authored-by: Dhruv Mittal <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>
Co-authored-by: e-wai <[email protected]>
Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: TW1234567 <[email protected]>
Co-authored-by: Ivan Yu <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: thywang <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Acezhang09 <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
BraydenRoyston added a commit that referenced this pull request Dec 17, 2023
* Refactor: Updates invite link in waitlist registration email #244

* Feat: Waitlist registration entry  (#237)

* Feat: Add personal info and emergency contact questions step1 (#238)

* Review Registration Personal Info (#223)

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Lint

* Add visited verification on review summary page.

* Add new dependency after resolving merge conflict.

* Address comments

* Registrant Experience: Review Information Step (Additional Info) (#246)

* Add and implement EditCardHeader

* Edit styles in additional question groups to support responsiveness

* Add additional info edit card and edit prop names for consistency

* Make all styles consistent.

* Lint

* Add error validation on save

* Add image upload to camp creation (#224)

* Add image upload to camp creation

* aspect ratio fixes

* Add error handling so that when a user tries to click next, errors are shown (if any).

Co-authored-by: twilkhoo <[email protected]>

* Fix: Safari time picker (#248)

* fix: require province to proceed (#252)

* Fix: camp creation validator logic (#249)

* Fix: camp creation validator logic

* Add EDLP logic

* Fix merge conflict error with the VStack

Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>

* Move campers modal (#247)

* update 'updateCamperByids' to allow moving between sessions

* very rough draft of full implementation

* remove console.log + added deleteActionCleanUp to reset the selected camper

* yarn fix + fix unimported components + remove console.log

* yarn for backend

* add check to find earliest and latest session date

* Lint

* Fix cancel button logic

* Lint + var rename

* styling changes + change html to chakra comps

Co-authored-by: twilkhoo <[email protected]>

* fix: session date ordering, hide completed sessions (#245)

* fix: session date ordering, hide completed sessions

* more ordering

* ordering and loading states

* Fix: Call Remove waitlisted camper only once (#255)

* Commit all changes

* Close before processing for deleting a camp also.

* Add wait list step 1 (#219)

* rebasing 'change routes to load waitlist registration + implement waitlist registration pages'

* fix age display

* remove generic footer + edit & use waitlist footer + shrink page top padding

* revert changes to formatSessionInfo back to what was in dev

* fix failed checkout url redirect bug

* Registrant Experience: Review Information Step (Add PersonalInfo and EmergencyContactQuestionsto EditCamperCard/ContactCard components) (#254)

* Commit all changes

* Remove spacer to make styles consistent

* Lint.

* Fix: Display EDLP tag applicable to a session (#258)

* Commit changes

* Address changes

* add check to ensure that at least one multiple choice option has text (#259)

* add check to ensure that at least one multiple choice option has text

* lint

* remove console.log

* Add error handling for whitespace options and require at least two options for multiple choice

---------

Co-authored-by: twilkhoo <[email protected]>

* Resolve error when registering for non-existant camp (#260)

* Commit changes

* Lint

* Add notFound comment.

* Lint.

* Waitlist backend call (#262)

* added adding waitlist campers call to the frontend

* use error message from backend api for registering waitlist camper

* run lint

* err msg change + variable name change

* Add "and" and period.

---------

Co-authored-by: twilkhoo <[email protected]>

* Registrant Experience: Review Information Step (EDLP) (#263)

* Commit all changes.

* Change type of setRequireEdlp to use React.Dispatch.

* Commit all changes. (#266)

* Fix camper edit functionality (#264)

* Commit all changes.

* Fix clicking a camper twice.

* Commit all changes. (#265)

* Add legacy openssl flag to build command (#271)

* Add a temp comment to track status before updating deps.

* Update react-scripts to v5 and test.

* Try using a legacy openssl flag to work around the conflicting hash error.

* Resolve uncaught error when viewing camp and fix coordinator/counsellor/volunteer editing (#267)

* Commit all changes.

* Create another endpoint for when we want to create new camp sessions.

* Consolidate changes into one endpoint.

* Fix: Manage sessions doesn’t persist. (#268)

* Add fields in schema to sort waitlisted campers (by date created). (#269)

* fix: docker build failing on old line (#272)

* fix: prevent duplicate multiple choice (#273)

* fix: prevent duplicates in multiple choice

* refactor: use enum for option error handling

* style: more descriptive names and clean up eslint warnings

* fix: Add current session date validation on camp creation flow (#274)

* added error message when trying to move to next page with no dates selected in session camp card

* fix: frontend lint fixes

* fix: PR Feeback

---------

Co-authored-by: Derrick Yang <[email protected]>

* Aaron/fix email validation (#277)

* feat: added two email verification tests

* feat: initial code for deep email validation check

* fix: removed deep-email-validator logic

* fix: removed deep-email-validator imports

* bug: removed unneeded dependencies and package bug

* feat: camper selection frontend (#281)

* feat: WIP, homepage of CamperCancellationRefund flow

* feat: WIP rough in refund page and component

* feat: WIP design layout of cancellation card

* feat: add RefundDTO

* feat: add refund dummy endpoint

* fix: lint

* fix: CSS

* feat: WIP hooked up backend

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: syntax fix to use map function for refund card

* feat: WIP, added information according to backend data onto CamperRefundInfoCards

* fix: added start/end time

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: WIP EDLP Time and grouping sessions based on name

Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: Added EDLP Time calculation

* fix: unneeded syntax

* fix: remove console log

* fix: formatting for multiplace instances

* fix: vstack width

* feat: disabled state for when first session is < 30 days

* fix: lint

* feat: added refundCode to URL

* fix: PR feedback

---------

Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: add refund link generation (#276)

 * feature: unique refund link generation

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>

* Setup Stripe webhooks (#250)

* Setup Stripe webhooks

---------

Co-authored-by: Nathan <[email protected]>

* fix: sorted session dates in registration emails (#278)

* fix: sorted session dates in registration emails

* bug: fixed linting issue with return

* fix: allow user to deselect multiselect options containing commas (#279)

* feat: batch process camper cancellations (#282)

* feat: batch process camper cancellations

* fix: allow user to change from short answer to multiple choice with rendered default option (#283)

* chore: fix lint (#284)

* Nathan tina/add discount amount to confirmation email (#286)

* Add discount amount to confirmation email (Nathan/Tina)

---------

Co-authored-by: Tina <[email protected]>

* feat: add check for registrationResult (#288)

* fix: refund cancellation fix updates (#289)

* fix: Code readibility and frontend fixes

Co-authored-by: Catherine Xie <[email protected]>

* fix: removed error

* fix: Added total refund at the bottom

* fix: Remove EDLP if it's 0$

* fix: WIP redirect when given wrong refund code

* fix: error handled gracefully from API

* feat: Added spinner styling when loading:

* fix: linting

* fix: textStyle for dynamic page sizing

* fix: button sizing for dynamic page size

* fix: linting

* fix: lint

* fix: Linting

* fix: Address PR Comments

* fix: Address PR Comments

* fix: Removed any warning by adding type

* fix: linting fix

* fix: linting fix

* fix: deleted unexpected console statement

---------

Co-authored-by: Derrick Yang <[email protected]>

* Add form validation to email in registration (#290)

* feat: add regex check to validate email

* fix: use existing checkEmail function

* Catherine derrick/error banner and coupon display (#296)

* feat: Added endpoint to retrieve discount info from stripe checkout session chargeId

* feat: Added frontend code to display refund amount, if any

* feat: Added error banner if cards are disabled

* feat: Refactored code so total refund changes based on selected cards

* feat: Added disable logic for button in the footer

* fix: linting

* fix: PR feedback - fixed negative discount total refund

* fix: PR feedback - distribute discount to be proportional to selected refund cards

* fix: linting

---------

Co-authored-by: Catherine Xie <[email protected]>

* feat: add validation for non-negative EDLP amount (#294)

* feat: add validation for non-negative EDLP amount

* fix: lint

* feat[BE]: add user refund flow (#291)

* feat: batch process camper cancellations

* feat: factor out Stripe refund creation

* refactor: use Promise all instead of await in loop

* feat: added new field "refundStatus" to camper obj

* fix: add refundstatus field for camp+camperservice

* fix: add refundStatus in more objects

* fix: changed variable names and refund status

* chore: changed "Not Refunded" status to "Paid"

* feat: added new field paymentintentid to camper

* fix: edit camper object with paymentintentid

* fix: included paymentintentid in cancellation func

* brayden/webhook integration

* fix: remove paymentintent, change cancel flow

* fix: fixed stripe api bug

* fix: patched refundstatus not updating in db

* fix: linting fixes

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* Derrick catherine/send data on request refund (#295)

* fix: add empty dep array so useEffect is only called once

* Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added loading for requestRefund button

* fix: lint

* fix: margin adjustment

* chore: lint

---------

Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>

* feat[FE]: add refund confirmation page (#293)

* feat: add refund confirmation page

---------

Co-authored-by: BraydenRoyston <[email protected]>

* hotfix[users cannot sign in]: fix for pre-existing cors issue on prod that client encountered

* fix: added access-control-allow-origin header to auth routes (#299)

---------

Co-authored-by: Dhruv Mittal <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>
Co-authored-by: e-wai <[email protected]>
Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: TW1234567 <[email protected]>
Co-authored-by: Ivan Yu <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: thywang <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Acezhang09 <[email protected]>
Co-authored-by: Derrick Yang <[email protected]>
Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
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.

3 participants