-
Notifications
You must be signed in to change notification settings - Fork 1
Organizer Portal: Judge Information Input
This page allows the organizer to match a judge to the API they will be judging.
name
: The organizer will input the judge's name.
api
: The organizer will match the inputted judge name to an API the judge is responsible for scoring for by selecting from a dropdown menu.
currName
: In this component, we store the judge name inputted by the user.
selected
: In this component, we store the API name selected by the user.
info
: In this component, we store a list of tuples that stores the name of the judge and their corresponding API category. Judge-API pairings already in the database are set to this state variable in componentDidMount
.
options
: In this component, we save a local copy of the different API categories to display in the dropdown menu. APIs are retrieved from the database in componentDidMount
.
deleted
: In this component, we store a list of deleted judge-API pairings to delete from the database.
reassignJudges
: In this component, we store a boolean dictating whether judges should be reassigned to projects. Judges are reassigned whenever a judge is deleted or added. Set to true by default.
getJudgeInfo
: In this function, we retrieve information from judges from the database, specifically the names of judges and their corresponding API pairings already stored in the database.
getAPI
: In this function, we retrieve a list of APIs to display in the dropdown menu from the database.
removeTask
: In this function, we delete a judge-API pairing from the database.
handleName
: In this function, we save the current input of the judge name to the state.
addInfo
: In this function, once the organizer presses submit after entering a judge-API pairing, we post the pairing to the database and save the pairing by adding it to the info
state variable.
postJudge
: In this function, we send the judge-API pairing to the database to be stored.
routeToPrev
: In this function, when the previous button is clicked, judges are assigned on the server-side and directs the organizer to the previous page (Data Entry).
routeToNext
: In this function, judges are assigned on the server-side and the organizer is directed to the next page (Hacker Spreadsheet). If not all APIs are matched to at least one judge, the organizer is alerted and is unable to proceed to the next page.
containsAPI
: In this function, true
is returned if the API is currently matched to at least one judge. Returns false
otherwise.
allAPIsSelected
: In this function, true
is returned if all APIs are matched to at least one judge. Returns false
otherwise.