Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/logic/assignments.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export const assignmentName = assignmentCode => {
case JUDGE_ASSIGNMENT_CODE:
return 'Judge';
default:
if (isStaffAssignment(assignmentCode)) {
// The rest of the staff assignments are named by their code suffix capitalized
const suffix = assignmentCode.substring('staff-'.length);
return suffix.charAt(0).toUpperCase() + suffix.slice(1);
}
throw new Error(`Unrecognised assignment code: '${assignmentCode}'`);
}
};
Expand Down