-
Notifications
You must be signed in to change notification settings - Fork 0
Description
User Story
As a TO: I want to run polls for best painted and most sporting. I want players to be able to vote via the app so that I don't have to mess around with lots of paper slips. I still want the ability to make the final choice though so that I can factor in other elements (perhaps the would-be-winner won the same prize last year, want to give it to someone else, etc.)
Functional Requirements
- The TO can open a poll at a time of their choosing.
- The TO can close an open poll at a time of their choosing.
- If a poll is opened, email users to remind them to vote.
- The TO can see the status of the vote at any time.
- The TO can click the "Award" button on the vote status.
- This will close the vote.
- This should show a warning if some votes are not in.
- This creates a new
TournamentAwardrecord for that competitor.
Implementation Details
This should be a separate entity in the DB; probably a TournamentPoll. By default it contains all competitors as options and each competitor can vote once.
Although this maybe should also incorporate a TournamentPollVote and they're all linked to one poll, this might be over-engineering it and meaning that to get the results you have to read 20-50 documents instead of 1. Instead a TournamentPoll schema could look like:
const fields = v.object({
isOpen: v.boolean(),
winnerTournamentCompetitorId: v.optional(v.id('tournamentCompetitors')),
votes: v.array(v.object({
castByUserId: v.id('users'), // Or registration ID?
castForTournamentCompetitorId: v.id('tournamentCompetitors'),
}),
});Metadata
Metadata
Assignees
Labels
Projects
Status