Commit Graph

3 Commits

Author SHA1 Message Date
70c80849df No longer delete winner as part of selecting prize.
Winners are rather marked with prize_selected and have it's own endpoint
to remove all winners.
2021-02-18 20:54:15 +01:00
a28a8ccacb When selecting prize, add winner to wine.
Changed the way we register a prize for winner.
Now we have a new prize_selected boolean field on a winner. This is
used to filter on when finding what winners have not selected a prize
yet. This also replaces the previous method of removing virtualWinners
after they selected a prize.

PrelotteryWine also get's a winner reference. This is used to filter on
when finding what prizes are left, and also makes it easier to
archive/register a lottery when the wine has a winner attached.
2021-02-18 20:50:30 +01:00
5e018f071d Prize distribution for selecting wines.
Moved the same functionality out from lottery.js and simplified a bit.
Now the backend also sends with wines to pick from.
When hitting the controller we check that the user is the next user in
line.
2021-01-26 22:42:33 +01:00