feat: Add invite link functionality to team
Summary: This PR introduces the ability for teams to invite members using a unique share link, secured by UUIDs. Previously, team invitations were sent individually via email. This update enhances the invitation process. #1049
-
Added a new
inviteLinkfield to the Team table in the database- Type: UUID
- Generated automatically when a new team is created
- Can be reset by team administrators
-
Implemented functionality to generate and reset the invite link
-
Created API endpoints for:
- Retrieving the current invite link
- Resetting the invite link
- Joining a team using the invite link
-
Updated the UI to display and manage the team invite link
-
The invite link is unique to each team
-
Team administrators can reset the link if needed
-
The existing functionality to invite users individually by email is preserved
-
Thoroughly tested the invite link functionality using Postman:
- Verified the generation of a valid invite link
- Tested the reset functionality for the invite link
- Confirmed successful team joining process using the invite link
https://github.com/user-attachments/assets/25b4753d-ee0f-432c-8a0f-479ca9a2048f
@ShreyasLakhani is attempting to deploy a commit to the mftsio Team on Vercel.
A member of the Team first needs to authorize it.
@mfts I migration folder I change code because of veriable conflict. Initially I used "shareLink " in prisma but in code I used "inviteLink" . So i changed all name and use single name "inviteLink".
Let me know, if any error occur.
/assign
The /assign command can only be used on issues, not on pull requests.
/assign
The /assign command can only be used on issues, not on pull requests.
@mfts if anything missing or not done please tell me. I didn't understand "please add the invite by link as a separate dialog / modal" and also I try to solve "One thing I didn't see is how the user actually signs up using the invite link. I think that part is missing or I missed it in the review somehow" this.
@mfts can you please review my changes before end of hacktoberfest.
@ShreyasLakhani will review your PR tomorrow.
and don't worry will award before end of hacktoberfest :)
@mfts Brother, I respect your time but You said that you will review. still no update on it and hacktoberfest and oss.gg is about to end.
I request to review or proceed award.
@ShreyasLakhani great progress, I mentioned the change requests inline.
I'm happy to award you 50% of the points now for the work already done. would love to push this over the line with your help.
/award 375
Awarding ShreyasLakhani: 375 points 🕹️ Well done! Check out your new contribution on oss.gg/ShreyasLakhani
@mfts Look at the changes I made.
- create new file for invite-link modal (components/teams/invite-link-modal.tsx)
- add accept and reject button along with error handling and build regular functions (pages/teams/invite/[code]/index.tsx)
- use swr instead of useEffect (components/teams/add-team-member-modal.tsx)
- removed uuid package
/award 375
Thanks @ShreyasLakhani awarding the second half. will review tomorrow and then hopefully can merge it in
Awarding ShreyasLakhani: 375 points 🕹️ Well done! Check out your new contribution on oss.gg/ShreyasLakhani
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| papermark | ❌ Failed (Inspect) | Dec 5, 2024 9:31am |