Skip to content

Commit

Permalink
show agreement numbers in holds (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
samplackett authored Feb 4, 2025
1 parent e1563eb commit c82982b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/holds.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const getHolds = async (page = 1, pageSize = 100, usePagination = true) => {
x.marketingYear = 'All'
x.canBeRemoved = true
}
if (!x.agreementNumber) {
x.agreementNumber = 'All'
x.canBeRemoved = true
}
return x
})
}
Expand Down
2 changes: 2 additions & 0 deletions app/views/payment-holds.njk
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<th scope="col" class="govuk-table__header">Description</th>
<th scope="col" class="govuk-table__header">Scheme</th>
<th scope="col" class="govuk-table__header">Marketing Year</th>
<th scope="col" class="govuk-table__header">Agreement Number</th>
<th scope="col" class="govuk-table__header">Created</th>
<th scope="col" class="govuk-table__header"></th>
</tr>
Expand All @@ -95,6 +96,7 @@
<td class="govuk-table__cell">{{ paymentHold.holdCategoryName }}</td>
<td class="govuk-table__cell">{{ paymentHold.holdCategorySchemeName }}</td>
<td class="govuk-table__cell">{{ paymentHold.marketingYear }}</td>
<td class="govuk-table__cell">{{ paymentHold.agreementNumber }}</td>
<td class="govuk-table__cell">{{ paymentHold.dateTimeAdded }}</td>
<td class="govuk-table__cell">
{% if paymentHold.canBeRemoved %}
Expand Down
3 changes: 2 additions & 1 deletion test/integration/narrow/routes/holds.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ describe('Payment holds', () => {
expect(holdCells.eq(1).text()).toEqual(mockPaymentHolds[i].holdCategoryName)
expect(holdCells.eq(2).text()).toEqual(mockPaymentHolds[i].holdCategorySchemeName)
expect(holdCells.eq(3).text()).toEqual(mockPaymentHolds[i].marketingYear)
expect(holdCells.eq(4).text()).toEqual(mockPaymentHolds[i].dateTimeAdded)
expect(holdCells.eq(4).text()).toEqual(mockPaymentHolds[i].agreementNumber)
expect(holdCells.eq(5).text()).toEqual(mockPaymentHolds[i].dateTimeAdded)
})
})

Expand Down

0 comments on commit c82982b

Please sign in to comment.