Skip to content

Commit

Permalink
✨ Voter eligibility check (#208)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#234
  • Loading branch information
Findeton authored Jul 17, 2024
1 parent 614788e commit 90be98d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/models/Models.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,20 @@ case class ShareTextItem(
}
}

case class VoterEligibilityScreen(
title: Option[String],
title_i18n: Option[Map[String, String]],
description: Option[String],
description_i18n: Option[Map[String, String]],
footer: Option[String],
footer_i18n: Option[Map[String, String]]
)
{
def validate() =
{
}
}

/** defines presentation options for an election */
case class ElectionPresentation(
share_text: Option[Array[ShareTextItem]],
Expand All @@ -1067,7 +1081,8 @@ case class ElectionPresentation(
i18n_override: Option[Map[String, Map[String, String]]],

public_title: Option[String],
public_title_i18n: Option[Map[String, String]]
public_title_i18n: Option[Map[String, String]],
voter_eligibility_screen: Option[VoterEligibilityScreen]
)
{
def shareTextConfig() : Option[Array[ShareTextItem]] = {
Expand Down
1 change: 1 addition & 0 deletions app/utils/JsonFormatters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ object JsonFormatters {
implicit val dateDtoF = Json.format[DateDTO]
implicit val voteF = Json.format[Vote]
implicit val electionExtraF = Json.format[ElectionExtra]
implicit val voterEligibilityScreenF = Json.format[VoterEligibilityScreen]
implicit val questionConditionF = Json.format[QuestionCondition]
implicit val conditionalQuestionF = Json.format[ConditionalQuestion]
implicit val electionF = Json.format[Election]
Expand Down

0 comments on commit 90be98d

Please sign in to comment.