The SQL query retrieving the votes is deterministicly sorted, but goes through
a HashMap, for ease of processing and transfer, which does not maintaing order.
Sort the resulting object in the Javascript to keep a consistent order in the graph.
In order to fill the missing truths with 0, a counter follows the next expected
truth number.
If it suddenly drops down, we changed player and it should reset as well.
However, as not all players are voted for on all truths, we might change players
but get a higher truth, which was not taken into account and could miss all
the zeroes at the beggining for this player.
Reset the counter if we change players.
- Create a new migration adding a Weeks table, allowing for new weekly introductions
and paving the way for multiple week handling.
- Add route to update the weekly introduction
- Move the week rendering to a specific week file
- Update the templates to use the week number from the week data
- Update templates to render and edit weekly introductions
This first version allows login of pre-existing users, creation and update of truths
by admins, vote on the truths by users, their display as well as a simple graph
for the vote results.
Everything persisting in a SQLite database.