-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: vote erasmus destination of the year #81
Comments
|
I'll keep the internal name generic to "contest" (instead of Erasmus of the Year), to be more flexible for possible changes in the next editions. /**
* A contest to which people can vote in.
*/
export class Contest extends Resource {
/**
* The ID of the contest.
*/
contestId: string;
/**
* Whether the contest is enabled and therefore shown in the menu.
*/
enabled: boolean;
/**
* If set, the vote is active (users can vote) and ends at the configured timestamp.
*/
voteEndsAt?: epochISOString;
/**
* Name of the contest.
*/
name: string;
/**
* Description of the contest.
*/
description: string;
/**
* The candidates of the contest (vote ballots).
*/
candidates: ContestCandidate[];
/**
* The count of votes for each of the sorted candidates.
* Note: the order of the candidates list must not change after a vote is open.
* This attribute is not accessible to non-admin users until `publishedResults` is true.
*/
results?: number[];
/**
* Whether the results are published and hence visible to any users.
*/
publishedResults: boolean;
}
/**
* A candidate in a contest.
*/
export class ContestCandidate extends Resource {
/**
* The name of the candidate.
*/
name: string;
/**
* An URL where to find more info about the candidate.
*/
url: string;
/**
* The country of the candidate.
* This is particularly important beacuse, if set, users can't vote for candidates of their own countries.
*/
country: string;
} I assume that the permissions needed to manage the contest is "canManageContents". |
Only registered ESNers
Yes, exactly! :) |
You can test the new feature on the dev environment. As anticipated, I created a more general structure to allow multiple contests — not only the Destination of the Year. This way, we can enhance user engagement on the app via silly/informal/formal contests throughout the event. |
As a user I'd like to be able to vote for this year's Erasmus Destination of the Year
As an admin/CT I'd like to be able to insert this year's candidate destinations through a dedicated UI.
Users should also be blocked from voting on own country
Vote must be anonymous
The text was updated successfully, but these errors were encountered: