From 041e4ff7bc794fe4b90e50ad495c4043ae0e23e4 Mon Sep 17 00:00:00 2001 From: Odysseus Chiu Date: Wed, 7 Aug 2024 09:14:42 -0700 Subject: [PATCH] 22061, 21522 - EFT shortname history (#2940) --- auth-web/package-lock.json | 4 +- auth-web/package.json | 2 +- .../pay/eft/ShortNameAccountLink.vue | 52 +-- .../pay/eft/ShortNamePaymentHistory.vue | 420 ++++++++++++++++++ .../pay/eft/ShortNameTransactions.vue | 211 --------- auth-web/src/models/eft-transaction.ts | 5 + auth-web/src/services/payment.services.ts | 12 +- auth-web/src/util/constants.ts | 19 +- .../views/pay/eft/ShortNameDetailsView.vue | 7 +- ...pec.ts => ShortNamePaymentHistory.spec.ts} | 90 ++-- 10 files changed, 524 insertions(+), 298 deletions(-) create mode 100644 auth-web/src/components/pay/eft/ShortNamePaymentHistory.vue delete mode 100644 auth-web/src/components/pay/eft/ShortNameTransactions.vue rename auth-web/tests/unit/components/{ShortNameTransactions.spec.ts => ShortNamePaymentHistory.spec.ts} (54%) diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index f3fcbc9e18..fb86f5c710 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.6.61", + "version": "2.6.62", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.6.61", + "version": "2.6.62", "dependencies": { "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/bread-crumb": "1.0.8", diff --git a/auth-web/package.json b/auth-web/package.json index cbc655928e..f56b4183cd 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.6.61", + "version": "2.6.62", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, diff --git a/auth-web/src/components/pay/eft/ShortNameAccountLink.vue b/auth-web/src/components/pay/eft/ShortNameAccountLink.vue index 1782450c9f..2490105a70 100644 --- a/auth-web/src/components/pay/eft/ShortNameAccountLink.vue +++ b/auth-web/src/components/pay/eft/ShortNameAccountLink.vue @@ -27,7 +27,7 @@ depressed class="mr-3" color="primary" - data-test="btn-cancel-change-access-type-dialog" + data-test="btn-cancel-confirmation-dialog" @click="dialogConfirmClose" > Cancel @@ -36,7 +36,7 @@ large depressed class="font-weight-bold btn-dialog" - data-test="btn-confirm-change-access-type-dialog" + data-test="btn-confirm-confirmation-dialog" color="primary" @click="dialogConfirm" > @@ -104,7 +104,7 @@ > mdi-clock-outline @@ -250,32 +250,32 @@ export default defineComponent({ { col: 'linkedAccount', hasFilter: false, - minWidth: '200px', + width: '200px', value: 'Linked Account' }, { col: 'accountBranch', hasFilter: false, - minWidth: '200px', + width: '210px', value: 'Branch' }, { col: 'statementId', hasFilter: false, - minWidth: '200px', + width: '260px', value: 'Latest Statement Number' }, { col: 'amountOwing', hasFilter: false, - minWidth: '175px', + width: '175px', value: 'Amount Owing' }, { col: 'actions', hasFilter: false, value: 'Actions', - minWidth: '150px' + width: '150px' } ] @@ -350,8 +350,11 @@ export default defineComponent({ async function applyPayment (item) { state.loading = true try { - await PaymentService.postShortnamePaymentAction(props.shortNameDetails.id, - item.accountId, ShortNamePaymentActions.APPLY_CREDITS) + const params = { + action: ShortNamePaymentActions.APPLY_CREDITS, + accountId: item.accountId + } + await PaymentService.postShortnamePaymentAction(props.shortNameDetails.id, params) } catch (error) { // eslint-disable-next-line no-console console.error('An errored occurred applying payments.', error) @@ -383,8 +386,11 @@ export default defineComponent({ async function cancelPayment (item) { state.loading = true try { - await PaymentService.postShortnamePaymentAction(props.shortNameDetails.id, - item.accountId, ShortNamePaymentActions.CANCEL) + const params = { + action: ShortNamePaymentActions.CANCEL, + accountId: item.accountId + } + await PaymentService.postShortnamePaymentAction(props.shortNameDetails.id, params) } catch (error) { // eslint-disable-next-line no-console console.error('An errored occurred cancelling payments pending.', error) @@ -494,26 +500,9 @@ export default defineComponent({ } ::v-deep { - table { - box-sizing: content-box; - thead { - tr { - th:first-of-type { - } - } - } - tbody { - tr { - td:first-of-type { - padding-left: 20px !important; - } - } - } + .base-table__header__title{ + padding: 16px } - .base-table__item-cell { - padding: 16px 0 16px 0 - } - .new-actions { .v-list { width:206px @@ -535,7 +524,6 @@ export default defineComponent({ .expanded-item { display: grid; max-width: 80%; - padding: 5px 0px 0px 0px; font-size: 16px; grid-template-columns: 35px 1fr; align-items: start; diff --git a/auth-web/src/components/pay/eft/ShortNamePaymentHistory.vue b/auth-web/src/components/pay/eft/ShortNamePaymentHistory.vue new file mode 100644 index 0000000000..63a24ac01c --- /dev/null +++ b/auth-web/src/components/pay/eft/ShortNamePaymentHistory.vue @@ -0,0 +1,420 @@ +