Skip to content

Commit

Permalink
Two-part tariff review pages housekeeping (#1050)
Browse files Browse the repository at this point in the history
During work on one of the final two-part tariff review pages, it was pointed out there are a few inconsistency's in some of the pages code.
This PR is for updating all the buttons on the two-part tariff review pages to have the preventDoubleClick attributes set as true. This is currently done on some pages but not all.
This PR is also removing an unnecessary 'fromFinanicalYearEnding' property that it being fetched on one of our fetch services. The property isn't used once it's been fetched so it makes sense to remove it.
  • Loading branch information
Beckyrose200 authored May 24, 2024
1 parent 32cf624 commit 7f771d0
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ async function _fetchBillRun (billRunId) {
.findById(billRunId)
.select(
'id',
'fromFinancialYearEnding',
'toFinancialYearEnding')
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/bill-runs/amend-adjustment-factor.njk
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
errorMessage: error.chargeAdjustmentElement
}) }}

{{ govukButton({ text: 'Confirm' }) }}
{{ govukButton({ text: 'Confirm', preventDoubleClick: true }) }}
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/bill-runs/amend-billable-returns.njk
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
{# Hidden input for authorised volume #}
<input type="hidden" name="authorisedVolume" value="{{ authorisedQuantity }}">

{{ govukButton({ text: 'Confirm' }) }}
{{ govukButton({ text: 'Confirm', preventDoubleClick: true }) }}
</form>
</div>
{% endblock %}
3 changes: 2 additions & 1 deletion app/views/bill-runs/match-details.njk
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@
{{ govukButton({
text: "Edit the billable returns",
href: "/system/bill-runs/" + billRunId + "/review/" + licenceId + "/match-details/" + chargeElement.chargeElementId + "/amend-billable-returns",
classes: "govuk-button--secondary"
classes: "govuk-button--secondary",
preventDoubleClick: true
}) }}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe('Amend Adjustment Factor Service', () => {
function _billRun () {
return {
id: 'cc4bbb18-0d6a-4254-ac2c-7409de814d7e',
fromFinancialYearEnding: 2023,
toFinancialYearEnding: 2023
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ describe('Charge Reference Details Service', () => {
function _billRun () {
return {
id: 'cc4bbb18-0d6a-4254-ac2c-7409de814d7e',
fromFinancialYearEnding: 2023,
toFinancialYearEnding: 2023
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ describe('Fetch Review Charge Reference service', () => {

expect(result.billRun).to.equal({
id: billRun.id,
fromFinancialYearEnding: billRun.fromFinancialYearEnding,
toFinancialYearEnding: billRun.toFinancialYearEnding
})
})
Expand Down

0 comments on commit 7f771d0

Please sign in to comment.