Skip to content

Commit

Permalink
[squash]: fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oswaldquek committed Dec 3, 2024
1 parent 92351eb commit 3541d73
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/GatewayAccount.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { GatewayAccountCredential, CREDENTIAL_STATE } = require('@models/GatewayA
* @property {string} analyticsId - Google analyticsId of the gateway account
* @property {boolean} toggle3ds - whether 3DS is enabled or not on this gateway account
* @property {[GatewayAccountCredential]} gatewayAccountCredentials - available credentials for gateway account
* @property {GatewayAccountCredential} activeCredential - the active credential for the gateway account
* @property {GatewayAccountCredential} [activeCredential] - the active credential for the gateway account
* @property {Object} rawResponse - raw 'gateway account' object
*/
class GatewayAccount {
Expand Down
34 changes: 29 additions & 5 deletions app/views/simplified-account/settings/worldpay-details/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,35 @@
You need to link your Worldpay account to GOV.UK Pay.
</p>

<ul class="govuk-task-list">
{% for task in tasks %}
{{ showTask(task) }}
{% endfor %}
</ul>
{% set taskList = [] %}
{% for task in tasks %}
{% set taskList = (taskList.push({
title: {
text: task.linkText
},
href: task.href,
status: {
tag: {
text: "Not yet started",
classes: "govuk-tag--blue"
}
} if task.complete == false else (
{
tag: {
text: "Completed",
classes: "govuk-tag--grey"
}
}
)
}), taskList) %}
{% endfor %}

{{ govukTaskList({
idPrefix: "worldpay-tasks",
items: taskList,
classes: "task-list"
}) }}

{% endif %}

{% endblock %}

0 comments on commit 3541d73

Please sign in to comment.