As a team owner, I want to have a page that shows me my team name, My name as the owner, and my team's invite code. I also want to see a button that allows me to delete the team.
Requirements
Make a page called TeamManagement.jsx in the client/pages/ directory
Show Team name
Show owner's name
Functional Delete button (should remove Team record and TeamMember record from db, don't worry about whether other ppl are in the team for now b/c joining a team isn't implemented yet)
If user is not in a team, render a text error message
[BACK END TASK]
Create a DELETE request that takes in userID and teamID, and deletes the relevant record in TeamMember and then Team record in the database.
If an error occurs, return an error code
Create a GET request that takes in userID and teamID, and obtains the team name and owner (current user)'s name
If an error occurs, return an error code
[FRONT END TASK]
Show text of Team name
Show text of Team owner
Show text of Team invite code
Have a button for Team deletion
Here is what the Team table looks like in the DB right now:
Here is what the TeamMember table looks like in the DB right now:
User Story
As a team owner, I want to have a page that shows me my team name, My name as the owner, and my team's invite code. I also want to see a button that allows me to delete the team.
Requirements
[BACK END TASK]
Create a DELETE request that takes in userID and teamID, and deletes the relevant record in TeamMember and then Team record in the database.
Create a GET request that takes in userID and teamID, and obtains the team name and owner (current user)'s name
[FRONT END TASK]
Here is what the Team table looks like in the DB right now:
Here is what the TeamMember table looks like in the DB right now: