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

Delete Friend Function #6

Merged
merged 11 commits into from
Apr 2, 2024
Merged

Delete Friend Function #6

merged 11 commits into from
Apr 2, 2024

Conversation

samarth52
Copy link
Contributor

@samarth52 samarth52 commented Apr 22, 2023

Summary

Resolves: gt-scheduler/website#236
Sibling PR: gt-scheduler/website#237

We need a function to remove mappings of a given user and friend for a given schedule version and term, from the friends and friend-invites collections.

Checklist

Functional Requirements

  • deletes any friend-invites record that corresponds to the current user, friend, term, and schedule version.
  • updates the friend's friends record such that the current user's schedule version is removed from the accessibleSchedules[userId] array for the chosen term

How to Test

  1. Host the website locally on Samarth/236-delete-friend-invitation branch.
  2. Use the Firebase emulator and update the link in the handleDelete function in src/components/InvitationModal/index.tsx.
  3. Test out the invitation modal

@samarth52 samarth52 requested a review from nhatnghiho April 22, 2023 16:10
@samarth52 samarth52 mentioned this pull request Oct 20, 2023
samarth52 added a commit to gt-scheduler/website that referenced this pull request Oct 20, 2023
### Summary

Resolves: #236 
Sibling PR: gt-scheduler/firebase-conf#6

We need a function to remove mappings of a given user and friend for a
given schedule version and term, from the `friends` and `friend-invites`
collections.

### Checklist

#### Functional Requirements
- [x]  Create a Firebase function that:
- deletes any `friend-invites` record that corresponds to the current
user, friend, term, and schedule version.
- updates the friend's `friends` record such that the current user's
schedule version is removed from the `accessibleSchedules[userId]` array
for the chosen term
- [x] Integrate the Firebase function with the `handleDelete` method in
`src/components/InvitationModal`

### How to Test
1. Use the Firebase emulator on branch `Samarth/delete-invitation` of
the Firebase conf repo.
2. Update the link in the `handleDelete` function in
`src/components/InvitationModal/index.tsx`.
3. Test out the invitation modal
@yatharth-b yatharth-b merged commit 3240045 into main Apr 2, 2024
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.

Delete Friend From Invitation Modal
2 participants