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

Unsubscription from monthly report confirmation page #4998

Merged
merged 12 commits into from
Sep 5, 2024

Conversation

codemist
Copy link
Collaborator

@codemist codemist commented Aug 30, 2024

References:

Jira: MNTOR-3556
Figma:https://www.figma.com/design/CaEKIhvSJqf6KNIMzSkt40/Concepts-for-Monitor-MVP-Redesign?node-id=2298-89690&node-type=FRAME&t=nkcj8ZpN91IIOPgD-0

Description

Screenshot (if applicable)

preview at http://localhost:6060/unsubscribe-from-monthly-report
image

image

Not applicable.

How to test

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

Copy link

@codemist codemist force-pushed the unsubscribe-email-confirmation-fe branch from 4fe81c5 to 3d6d35e Compare September 3, 2024 19:23
Comment on lines +33 to +45
const handleUnsubscription = async () => {
try {
const response = await fetch(`/api/unsubscribe?token=${token}`, {
method: "GET",
});

if (response.ok) {
setUnsubscribeSuccess(true);
}
} catch (e) {
console.error("Error during unsubscription:", e);
}
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Vinnl Do you know how to retrieve the users' email without having to query it from the URL?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was hoping that wouldn't be necessary - see #4988 (comment).

@codemist codemist marked this pull request as ready for review September 4, 2024 15:19
@codemist codemist requested a review from flodolo as a code owner September 4, 2024 15:19
@codemist codemist merged commit 9703461 into MNTOR-3556 Sep 5, 2024
7 checks passed
@codemist codemist deleted the unsubscribe-email-confirmation-fe branch September 5, 2024 11:49
Copy link

github-actions bot commented Sep 5, 2024

Cleanup completed - database 'blurts-server-pr-4998' destroyed, cloud run service 'blurts-server-pr-4998' destroyed

codemist added a commit that referenced this pull request Sep 5, 2024
* fix: gurantee boolean value

* fix: update should upsert too

* fix: delete primary_email field

* fix: remove dup primary_email from new table

* fix: generate the link for the unsub page instead

* feat: some example code for FE

* extract data from the right table

* Unsubscription from monthly report confirmation page

* pass in the right function

* fix unit tests

* fix unit tests

---------

Co-authored-by: Joey Zhou <[email protected]>
codemist added a commit that referenced this pull request Sep 5, 2024
* fix: gurantee boolean value

* fix: update should upsert too

* fix: delete primary_email field

* fix: remove dup primary_email from new table

* fix: generate the link for the unsub page instead

* feat: some example code for FE

* extract data from the right table

* Unsubscription from monthly report confirmation page

* pass in the right function

* fix unit tests

* fix unit tests

---------

Co-authored-by: Joey Zhou <[email protected]>
codemist added a commit that referenced this pull request Sep 12, 2024
* fix: gurantee boolean value

* fix: update should upsert too

* fix: delete primary_email field

* fix: remove dup primary_email from new table

* fix: generate the link for the unsub page instead

* feat: some example code for FE

* extract data from the right table

* Unsubscription from monthly report confirmation page

* pass in the right function

* fix unit tests

* fix unit tests

---------

Co-authored-by: Joey Zhou <[email protected]>
codemist added a commit that referenced this pull request Sep 13, 2024
* feat: some example code for FE

* extract data from the right table

* Unsubscription from monthly report confirmation page (#4998)

* fix: gurantee boolean value

* fix: update should upsert too

* fix: delete primary_email field

* fix: remove dup primary_email from new table

* fix: generate the link for the unsub page instead

* feat: some example code for FE

* extract data from the right table

* Unsubscription from monthly report confirmation page

* pass in the right function

* fix unit tests

* fix unit tests

---------

Co-authored-by: Joey Zhou <[email protected]>

* pass subscriber data

* return void

* add toast

* correct api endpoint

* remove debugging comments

* add try again link

* add feature flag

* rename file

* override css variables

* wrap in try catch

* add loader

* fixup

* add toat if catch error

* remove original css override styles

* move to /unsubscribe-email folder

* lint

* add try again styling

* use plus language for header

* unit test

---------

Co-authored-by: Kaitlyn <[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