Skip to content
This repository was archived by the owner on Jun 15, 2020. It is now read-only.

Judging Portal: Project Info Page

Rachel Lau edited this page Apr 27, 2019 · 3 revisions

Inputs from User

score: In this component, the judge will scores for each of the categories through entering a number in the input field. We will use this input to calculate the final rankings of the hackathon.

State Variables

judgeId: In this component, we store judge id. We set the state in componentDidMount and use it to navigate back to the scoring overview page for the specific judge.

projectId: In this component, we store the project id. We set the state in componentDidMount and use to store the scores the judges input into the correct project for scoring.

scores: In this component, we store the scores that the judges input in a dictionary (because there may be multiple scoring categories). We set the state when the judge enters a score into the scoring fields.

Functions

changeScore(category, score): This is a helper function that changed the score of the specified category. This updates the state variable scores.

updateScore(): This function calls putScore for each other categories scored and routeToPrev. It is called when the judge clicks the back button.

putScore(category): This function puts (updates) SQL database to reflect the judge's scoring of the project in the categories.

routeToPrev(): This function navigates the judge back to the scoring overview page.

Clone this wiki locally