Skip to content

Commit

Permalink
APS-840: Show the notes even if nothing is withdrawable
Browse files Browse the repository at this point in the history
  • Loading branch information
vubalasu committed Jun 20, 2024
1 parent a760b42 commit 9660996
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
6 changes: 5 additions & 1 deletion integration_tests/tests/withdrawals/withdrawals.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ context('Withdrawals', () => {
hasRequestsForPlacement: false,
})

const withdrawables = withdrawablesFactory.build({
withdrawables: [],
})

cy.task('stubWithdrawablesWithNotes', {
applicationId: application.id,
withdrawables: [],
withdrawables,
})
cy.task('stubApplications', [application])
cy.task('stubApplicationGet', { application })
Expand Down
15 changes: 7 additions & 8 deletions server/views/applications/withdrawables/new.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
{% if notes | length > 0 %}
<ul class="govuk-list govuk-list--bullet">
{% for note in notes %}
<li>{{note}}</li>
{% endfor %}
</ul>
{% endif %}
{% if withdrawables.length %}
{% if notes | length > 0 %}
<ul class="govuk-list govuk-list--bullet">
{% for note in notes %}
<li>{{note}}</li>
{% endfor %}
</ul>
{% endif %}

<form action={{paths.applications.withdraw.new({id: id})}} method="post"/>
<input type="hidden" name="_csrf" value="{{ csrfToken }}"/>

Expand Down

0 comments on commit 9660996

Please sign in to comment.