Skip to content

Commit

Permalink
20417 - UXA Fixes (#2816)
Browse files Browse the repository at this point in the history
  • Loading branch information
ochiu authored May 10, 2024
1 parent ceed3e2 commit 012aaea
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.7",
"version": "2.6.8",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
4 changes: 3 additions & 1 deletion auth-web/src/components/pay/eft/ShortNameAccountLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
v-else
class="d-flex justify-space-between pa-5 unlinked-text"
>
This short name is not linked with an account.
<span class="pt-1">
This short name is not linked with an account.
</span>
<v-btn
id="link-shortname-btn"
color="primary"
Expand Down
17 changes: 13 additions & 4 deletions auth-web/src/components/pay/eft/ShortNameTransactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</span>
</template>
<template #item-slot-transactionAmount="{ item }">
<span>{{ formatCurrency(item.transactionAmount) }}</span>
<span>{{ formatTransactionAmount(item) }}</span>
</template>
</BaseVDataTable>
</template>
Expand Down Expand Up @@ -87,13 +87,13 @@ export default defineComponent({
{
col: 'statementId',
hasFilter: false,
minWidth: '200px',
minWidth: '175px',
value: 'Related Statement Number'
},
{
col: 'transactionAmount',
hasFilter: false,
minWidth: '125px',
minWidth: '355px',
value: 'Amount'
}
]
Expand Down Expand Up @@ -150,8 +150,17 @@ export default defineComponent({
return item?.transactionDescription === ShortNameTransactionRowType.STATEMENT_PAID
}
function formatTransactionAmount (item: any) {
if (item.transactionAmount === undefined) return ''
let amount = CommonUtils.formatAmount(item.transactionAmount)
if (isStatementPaid(item)) {
amount = `-${amount}`
}
return amount
}
return {
formatCurrency: CommonUtils.formatAmount,
formatTransactionAmount,
formatDate: CommonUtils.formatDisplayDate,
formatAccountDisplayName: CommonUtils.formatAccountDisplayName,
headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('ShortNameTransactions.vue', () => {
expect(columns.at(1).text()).toContain(transactionsResponse.items[i].transactionDescription)
expect(columns.at(2).text()).toBe(transactionsResponse.items[i].statementId
? transactionsResponse.items[i].statementId.toString() : '')
expect(columns.at(3).text()).toBe(
expect(columns.at(3).text()).toContain(
CommonUtils.formatAmount(transactionsResponse.items[i].transactionAmount))
}
})
Expand Down

0 comments on commit 012aaea

Please sign in to comment.