-
Notifications
You must be signed in to change notification settings - Fork 1
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
Catherine derrick/error banner and coupon display #296
Catherine derrick/error banner and coupon display #296
Conversation
Visit the preview URL for this PR (updated for commit 9a35df8): https://focus-on-nature--pr296-catherine-derrick-er-qm75l6ns.web.app (expires Tue, 22 Aug 2023 02:03:43 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0aeb3dd1cc2aa82265739c366a8befd0d956fd1f |
Stumbled upon a semi-gnarly edge case, check out this link: http://localhost:3000/refund/f874e4acfbbf3bb7.
Gives us this weird error state with a negative refund. Alternate link with two campers: http://localhost:3000/refund/5015d9ac457f53a4 Possible Workaround: !!! One more thing to test !!!
|
Other than those callouts, this is looking great. Excellent job and good call on updating the refund amount based on what cards are selected. I like it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
* 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]>
* 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]>
* 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]>
Notion ticket link
Cancellation-Refund-Populate-camper-selection-page-with-real-data-edge-cases
Implementation description
GET
endpoint that retrieves discount information from stripeRequest Refund
button if either: None of the cards are selected, or refund is disabledI also added a unrelated change that is a nice-to-have:
Steps to test
0
Total Refund
is updated correctly each timeWhat should reviewers focus on?
Checklist