diff --git a/client/screen.css b/client/screen.css index 66d641f7..381cef67 100644 --- a/client/screen.css +++ b/client/screen.css @@ -630,6 +630,17 @@ th.rla-county-contest-info { grid-template-columns: 2fr 1fr; } +.contest-choice-review-grid-irv { + display: grid; + grid-column-gap: 1rem; + grid-template-columns: 5fr 1fr; +} + +.contest-choice-review-grid-irv > .contest-choice-selection { + /* Disable hover and cursor changes for review page */ + pointer-events: none; +} + .contest-choice-review { display: grid; grid-column-gap: 1rem; diff --git a/client/src/component/County/Audit/Wizard/ReviewStage.tsx b/client/src/component/County/Audit/Wizard/ReviewStage.tsx index cf3cfa5f..1bb59450 100644 --- a/client/src/component/County/Audit/Wizard/ReviewStage.tsx +++ b/client/src/component/County/Audit/Wizard/ReviewStage.tsx @@ -4,6 +4,7 @@ import * as _ from 'lodash'; import { Button, Icon, Intent } from '@blueprintjs/core'; +import IrvChoiceForm from 'corla/component/County/Audit/Wizard/IrvChoiceForm'; import SubmittingACVR from './SubmittingACVR'; interface EditButtonProps { @@ -75,7 +76,7 @@ interface BallotContestReviewProps { const BallotContestReview = (props: BallotContestReviewProps) => { const { back, contest, marks } = props; const { comments, noConsensus } = marks; - const { votesAllowed } = contest; + const { votesAllowed, description } = contest; const markedChoices: County.ACVRChoices = _.pickBy(marks.choices); const votesMarked = _.size(markedChoices); @@ -121,6 +122,24 @@ const BallotContestReview = (props: BallotContestReviewProps) => { ); } + if (description === 'IRV') { + // convert props to ChoicesProps for IRV Display + const irvChoicesProps: ChoicesProps = { + choices: contest.choices, + description, + marks, + noConsensus, + // null OnClick for review stage since clicking should not change markings + updateBallotMarks: () => null, + }; + + return ( +
+ { IrvChoiceForm(irvChoicesProps) } +
+ ); + } + return (
{ markedChoiceDivs.length ? markedChoiceDivs : noMarksDiv } @@ -134,7 +153,7 @@ const BallotContestReview = (props: BallotContestReviewProps) => {
{ contest.name }
{ contest.description }
-
+
{ noConsensus ? noConsensusDiv : renderMarkedChoices() }