From e2793f0e3cd3f6eb6419cd3dd8827a0285b7f6d4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 3 Feb 2023 13:54:07 -0500 Subject: [PATCH] Fix set current button logic --- admin-ui/src/component/ElectionCard.tsx | 43 +++++++++++++------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/admin-ui/src/component/ElectionCard.tsx b/admin-ui/src/component/ElectionCard.tsx index 50a937d..41d2746 100644 --- a/admin-ui/src/component/ElectionCard.tsx +++ b/admin-ui/src/component/ElectionCard.tsx @@ -180,29 +180,30 @@ export default function ElectionCard({ )} - {((!election.electionStatus || + {(!election.electionStatus || election.electionStatus === ElectionStatus.draft) && - !currentElection) || - (currentElection && - currentElection?.electionId !== election.electionId && - currentElection?.latMode !== 1 && - currentElection?.electionStatus !== ElectionStatus.open && ( - - - - ))} + }} + > + Set Current + + + )} {election?.electionStatus === ElectionStatus.inactive && // Current Election election?.testVotersSet && //Test voters are set