From 6218987fdff43089587c01170e41bea2ae9d3115 Mon Sep 17 00:00:00 2001 From: Zachary Rogers Date: Tue, 24 Sep 2024 09:40:44 -0700 Subject: [PATCH] 10409: Add unassigned judge as an option; --- .../src/presenter/computeds/trialSessionsHelper.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web-client/src/presenter/computeds/trialSessionsHelper.ts b/web-client/src/presenter/computeds/trialSessionsHelper.ts index 48c0dd28379..b67f23e5758 100644 --- a/web-client/src/presenter/computeds/trialSessionsHelper.ts +++ b/web-client/src/presenter/computeds/trialSessionsHelper.ts @@ -29,7 +29,6 @@ export const trialSessionsHelper = ( showNewTrialSession: boolean; showNoticeIssued: boolean; showSessionStatus: boolean; - showUnassignedJudgeFilter: boolean; trialSessionJudgeOptions: { label: string; value: { name: string; userId: string }; @@ -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 } = @@ -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,