Skip to content

0.1844.0

Compare
Choose a tag to compare
@hmrc-web-operations hmrc-web-operations released this 17 Dec 09:27
· 11 commits to main since this release
810d5f4

Release : gform-frontend 0.1844.0

Last commit sha : 810d5f4
Last commit author : Carl Manson
Last commit time : 2024-12-17T09:14:26Z

GFORMS-2360 - Specify list of page IDs to revisit on form component data change (#2352)

  • GFORMS-2360 - Add ability to specify page ids to display again on change of field

  • GFORMS-2360 - Refactor revisit code

  • GFORMS-2360 - Added tests

{
"_id": "gforms2360",
"formName": "Redisplay calculations",
"description": "",
"version": 1,
"authConfig": {
"authModule": "hmrc"
},
"sections": [
{
"type": "addToList",
"title": "Tax years",
"shortName": "Tax year $n",
"summaryDescription": "${taxYear}",
"summaryName": "Tax year costs",
"description": "Tax year $n",
"presentationHint": "invisiblePageTitle",
"addAnotherQuestion": {
"id": "addAnotherTaxYear",
"type": "choice",
"label": "Do you want to add another tax year?",
"labelSize": "s",
"format": "yesno",
"errorMessage": "Select yes if you want to add another tax year"
},
"pages": [
{
"title": "What tax year?",
"fields": [
{
"id": "taxYear",
"shortName": "Tax year",
"type": "choice",
"choices": [
"2023",
"2024",
"2025"
]
}
]
},
{
"title": "How many passengers?",
"fields": [
{
"id": "passengers",
"shortName": "Passengers",
"type": "text",
"format": "positiveWholeNumber",
"pageIdsToDisplayOnChange": [
"calculationPage"
]
}
]
},
{
"title": "What rate was paid?",
"fields": [
{
"id": "rate",
"shortName": "Rate paid",
"type": "text",
"format": "positiveSterling",
"pageIdsToDisplayOnChange": [
"calculationPage",
"passengersPage"
]
}
]
},
{
"title": "Calculation",
"id": "calculationPage",
"fields": [
{
"id": "calculation",
"type": "info",
"label": "",
"infoText": "Amount owed - ${rate * passengers}",
"infoType": "noformat"
}
]
}
]
},
{
"title": "How many exempt passengers?",
"presentationHint": "invisiblePageTitle",
"fields": [
{
"id": "passengersExempt",
"shortName": "Exempt passengers",
"type": "text",
"format": "positiveWholeNumber",
"pageIdsToDisplayOnChange": [
"passengersPage"
]
}
]
},
{
"title": "Total passengers",
"id": "passengersPage",
"fields": [
{
"id": "totalPassengers",
"type": "info",
"label": "",
"infoText": "Total passengers - ${passengersExempt + passengers.sum}",
"infoType": "noformat"
}
]
},
{
"title": "Some extra page",
"fields": [
{
"id": "value",
"shortName": "Extra value",
"type": "text",
"format": "positiveSterling"
}
]
}
],
"acknowledgementSection": {
"title": "Confirmation page ",
"fields": []
},
"destinations": [
{
"id": "transitionToSubmitted",
"type": "stateTransition",
"requiredState": "Submitted"
}
]
}

  • GFORMS-2360 - Fix tests after rebase