Releases: hmrc/gform-frontend
0.1845.0
0.1844.0
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
0.1843.0
0.1842.0
0.1833.3
Release : gform-frontend 0.1833.3
Last commit sha : c416a7a
Last commit author : Josef Vlach
Last commit time : 2024-12-12T17:33:43Z
GFORMS-3073 - Smart strings are not playing back correctly in tables with alternate values based on includeIf expression (#2349)
{
"_id": "multi-value-string-issue",
"formName": "Multi value string issue",
"description": "Multi value string issue",
"version": 1,
"emailTemplateId": "dynamicEmail_confirmation",
"authConfig": {
"authModule": "anonymous"
},
"sections": [
{
"title": "Enter amount",
"fields": [
{
"id": "amount",
"type": "text",
"format": "number",
"value": "${'123'}"
}
]
},
{
"title": [
{
"en": "Table"
}
],
"fields": [
{
"id": "gformTable",
"summaryValue": [
{
"en": "X"
}
],
"type": "table",
"label": [
{
"en": "Header row and Value row must be equal"
}
],
"header": [
{
"en": "${amount}, ${amount}, ${amount}, ${amount}"
}
],
"rows": [
{
"values": [
{
"value": [
{
"en": "${'Foo'} ${'Bar'} ${'Baz'}",
"includeIf": "${1 = 2}"
},
{
"en": "${amount}, ${amount}, ${amount}, ${amount}"
}
]
}
]
}
]
}
]
}
],
"acknowledgementSection": {
"fields": []
},
"destinations": [
{
"id": "transitionToSubmitted",
"type": "stateTransition",
"requiredState": "Submitted"
}
]
}
0.1833.2
0.1841.0
Release : gform-frontend 0.1841.0
Last commit sha : adc13fe
Last commit author : Josef Vlach
Last commit time : 2024-12-12T17:33:43Z
GFORMS-3073 - Smart strings are not playing back correctly in tables with alternate values based on includeIf expression (#2349)
{
"_id": "multi-value-string-issue",
"formName": "Multi value string issue",
"description": "Multi value string issue",
"version": 1,
"emailTemplateId": "dynamicEmail_confirmation",
"authConfig": {
"authModule": "anonymous"
},
"sections": [
{
"title": "Enter amount",
"fields": [
{
"id": "amount",
"type": "text",
"format": "number",
"value": "${'123'}"
}
]
},
{
"title": [
{
"en": "Table"
}
],
"fields": [
{
"id": "gformTable",
"summaryValue": [
{
"en": "X"
}
],
"type": "table",
"label": [
{
"en": "Header row and Value row must be equal"
}
],
"header": [
{
"en": "${amount}, ${amount}, ${amount}, ${amount}"
}
],
"rows": [
{
"values": [
{
"value": [
{
"en": "${'Foo'} ${'Bar'} ${'Baz'}",
"includeIf": "${1 = 2}"
},
{
"en": "${amount}, ${amount}, ${amount}, ${amount}"
}
]
}
]
}
]
}
]
}
],
"acknowledgementSection": {
"fields": []
},
"destinations": [
{
"id": "transitionToSubmitted",
"type": "stateTransition",
"requiredState": "Submitted"
}
]
}
0.1840.0
0.1839.0
Release : gform-frontend 0.1839.0
Last commit sha : 391417a
Last commit author : jmartinhmrc
Last commit time : 2024-12-10T14:44:40Z
GFORMS-3052 - Allow employments dataRetrieve to work in addToList and… (#2342)
-
GFORMS-3052 - Allow employments dataRetrieve to work in addToList and for a year selected from a choice. Form template example:
{
"_id": "add-to-list-dynamic-employments",
"formName": "Task list",
"description": "",
"version": 1,
"emailTemplateId": "eeitt_submission_confirmation",
"authConfig": {
"authModule": "hmrc"
},
"sections": [
{
"type": "addToList",
"title": "Tax years",
"shortName": "Tax year $n",
"summaryDescription": "Item $n",
"summaryName": "Tax year costs",
"description": "Item $n",
"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": "taxYearChoiceAtl",
"type": "choice",
"choices": [
{
"en": "2024",
"value": "2024"
},
{
"en": "2023",
"value": "2023"
}
]
}
],
"dataRetrieve": [
{
"type": "employments",
"id": "individualsEmploymentsAtl",
"parameters": {
"nino": "${auth.payenino}",
"taxYear": "${taxYearChoiceAtl}"
}
}
]
},
{
"title": "Which employer are you requesting a recalculation for?",
"shortName": "Employer",
"fields": [
{
"id": "employerAtl",
"type": "choice",
"errorMessage": "Select the employment you are requesting a recalculation for",
"shortName": "Employment for NICs recalculation",
"dividerPosition": "NONE",
"choices": [
{
"en": "${dataRetrieve.individualsEmploymentsAtl.employerName}",
"dynamic": "dataRetrieve.individualsEmploymentsAtl.employerName",
"hint": "Your payroll ID for this job: ${dataRetrieve.individualsEmploymentsAtl.worksNumber}",
"value": "EMP"
},
{
"en": "None of the above",
"value": "NONE"
}
]
}
]
}
]
}
],
"acknowledgementSection": {
"title": "Confirmation page ",
"fields": []
},
"destinations": [
{
"id": "transitionToSubmitted",
"type": "stateTransition",
"requiredState": "Submitted"
}
]
} -
GFORMS-3052 - Reuse addPrefixToString in expandOptionDataDynamicDataRetrieveCtx