Permissions: GM of team (and admin, just to peak in on the state of things)
After a user has created the team they now need to select players to define what the team is made up of.
The user will see a list of teams based off of the season data for the league.
Within this list of teams a drop down will be displayed to show the list of players the user can select. This list of players also come from the season data. The player data should show first and last name along with player position.
If the league rules for number of players per team is more than 1, then the UI will display that number of players per team.
Validation:
All player fields are filled in
The number of players per positions match the rules
If multiple players per team then no player is selected more than once
On submission the fantasy team is compared to existing teams to make sure that the fantasy team doesn’t have the exact same players
The first 3 validations can be done on client side, while the last one can only be done on server side. All 4 validations will be done on the server side.
The user submits the data that will be updated through the API. The validations are done the server side. If there is errors the validation errors will be sent back to the client. The data is saved no matter what. If there are no errors then the valid state of the fantasy team is updated to true.
Permissions: GM of team (and admin, just to peak in on the state of things) After a user has created the team they now need to select players to define what the team is made up of. The user will see a list of teams based off of the season data for the league. Within this list of teams a drop down will be displayed to show the list of players the user can select. This list of players also come from the season data. The player data should show first and last name along with player position. If the league rules for number of players per team is more than 1, then the UI will display that number of players per team.
Validation:
Mutation yet to be defined