Skip to content

Commit

Permalink
10409: Add unassigned judge as an option;
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Rogers committed Sep 24, 2024
1 parent 6071ea5 commit 6218987
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions web-client/src/presenter/computeds/trialSessionsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const trialSessionsHelper = (
showNewTrialSession: boolean;
showNoticeIssued: boolean;
showSessionStatus: boolean;
showUnassignedJudgeFilter: boolean;
trialSessionJudgeOptions: {
label: string;
value: { name: string; userId: string };
Expand Down Expand Up @@ -86,6 +85,15 @@ export const trialSessionsHelper = (
value: { name: trialSessionJudge.name, userId: trialSessionJudge.userId },
}),
);

const showUnassignedJudgeFilter = filters.currentTab === 'new';
if (showUnassignedJudgeFilter) {
trialSessionJudgeOptions.push({
label: 'Unassigned',
value: { name: 'Unassigned', userId: 'unassigned' },
});
}

const states = getTrialCitiesGroupedByState();

const { endDateErrorMessage, startDateErrorMessage } =
Expand Down Expand Up @@ -116,7 +124,6 @@ export const trialSessionsHelper = (
showNewTrialSession: permissions.CREATE_TRIAL_SESSION,
showNoticeIssued: filters.currentTab === 'calendared',
showSessionStatus: filters.currentTab === 'calendared',
showUnassignedJudgeFilter: filters.currentTab === 'new',
startDateErrorMessage,
totalPages: Math.ceil(filteredTrialSessions.length / pageSize),
trialCitiesByState: states,
Expand Down

0 comments on commit 6218987

Please sign in to comment.