Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLATUI-2709: Adding missing aliase for AddToAList, amended List to Se… #286

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
For compatibility information see `govukFrontendVersion` and `hmrcFrontendVersion` in
[LibDependencies](project/LibDependencies.scala)

## [9.1.0] - 2024-03-14
## [9.1.0] - 2024-03-19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be 9.2.0?


### Changed

- Updated README with guidance on adding fixtures to the excluded-fixtures folder.
- Updated `TaskList` viewmodel, updated missing Aliases

### Compatible with

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import play.api.libs.json._
import uk.gov.hmrc.govukfrontend.views.viewmodels.CommonJsonFormats._

case class TaskList(
items: List[TaskListItem] = List.empty,
items: Seq[TaskListItem] = Seq.empty,
classes: String = "",
attributes: Map[String, String] = Map.empty,
idPrefix: String = ""
Expand All @@ -33,15 +33,15 @@ object TaskList {

implicit def jsonReads: Reads[TaskList] =
(
(__ \ "items").readWithDefault[List[TaskListItem]](defaultObject.items) and
(__ \ "items").readWithDefault[Seq[TaskListItem]](defaultObject.items) and
(__ \ "classes").readWithDefault[String](defaultObject.classes) and
(__ \ "attributes").readWithDefault[Map[String, String]](defaultObject.attributes)(attributesReads) and
(__ \ "idPrefix").readWithDefault[String](defaultObject.idPrefix)
)(TaskList.apply _)

implicit def jsonWrites: OWrites[TaskList] =
(
(__ \ "items").write[List[TaskListItem]] and
(__ \ "items").write[Seq[TaskListItem]] and
(__ \ "classes").write[String] and
(__ \ "attributes").write[Map[String, String]] and
(__ \ "idPrefix").write[String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ trait Aliases {
type AddToAList = viewmodels.addtoalist.AddToAList
val AddToAList = viewmodels.addtoalist.AddToAList

type ListItem = viewmodels.addtoalist.ListItem
val ListItem = viewmodels.addtoalist.ListItem

type ItemType = viewmodels.addtoalist.ItemType
val ItemType = viewmodels.addtoalist.ItemType

type Timeline = viewmodels.timeline.Timeline
val Timeline = viewmodels.timeline.Timeline

Expand Down