Skip to content

Commit

Permalink
feat(app): cleanup var names
Browse files Browse the repository at this point in the history
  • Loading branch information
Demwunz committed May 23, 2024
1 parent 6762b5c commit 18867cc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/views/return-requirements/check.njk
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</form>
{% for requirement in requirements %}
{# Set an easier to use index #}
{% set rowIndex = loop.index0 %}
{% set rowIndex = requirement.index %}
<div>
{{ govukSummaryList({
card: {
Expand All @@ -130,7 +130,7 @@
actions: {
items: [
{
href: "purpose/" + requirement.index,
href: "purpose/" + rowIndex,
text: "Change",
visuallyHiddenText: "Purpose"
}
Expand All @@ -147,7 +147,7 @@
actions: {
items: [
{
href: "points/" + requirement.index,
href: "points/" + rowIndex,
text: "Change",
visuallyHiddenText: "Point"
}
Expand All @@ -164,7 +164,7 @@
actions: {
items: [
{
href: "abstraction-period/" + requirement.index,
href: "abstraction-period/" + rowIndex,
text: "Change",
visuallyHiddenText: "Abstraction period"
}
Expand All @@ -176,12 +176,12 @@
text: "Returns cycle"
},
value: {
html: requirement.returnsCycle | capitalize
html: "requirement.returnsCycle"
},
actions: {
items: [
{
href: "returns-cycle/" + requirement.index,
href: "returns-cycle/" + rowIndex,
text: "Change",
visuallyHiddenText: "Returns cycle"
}
Expand All @@ -198,7 +198,7 @@
actions: {
items: [
{
href: "site-description/" + requirement.index,
href: "site-description/" + rowIndex,
text: "Change",
visuallyHiddenText: "Site description"
}
Expand All @@ -215,7 +215,7 @@
actions: {
items: [
{
href: "frequency-collected/" + requirement.index,
href: "frequency-collected/" + rowIndex,
text: "Change",
visuallyHiddenText: "Collection"
}
Expand All @@ -232,7 +232,7 @@
actions: {
items: [
{
href: "frequency-reported/" + requirement.index,
href: "frequency-reported/" + rowIndex,
text: "Change",
visuallyHiddenText: "Reporting"
}
Expand All @@ -249,7 +249,7 @@
actions: {
items: [
{
href: "agreements-exceptions/" + requirement.index,
href: "agreements-exceptions/" + rowIndex,
text: "Change",
visuallyHiddenText: "Agreements exception"
}
Expand All @@ -263,7 +263,7 @@
text: "Remove requirement",
classes: "govuk-button--warning",
preventDoubleClick: true,
href: "/system/return-requirements/" + sessionId + "/remove/" + requirement.index
href: "/system/return-requirements/" + sessionId + "/remove/" + rowIndex
}) }}
{% endif %}
</div>
Expand Down

0 comments on commit 18867cc

Please sign in to comment.