diff --git a/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue b/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue
index b4835f651b..d3a1da5f21 100644
--- a/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue
+++ b/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue
@@ -118,6 +118,12 @@ export default defineComponent({
PaymentMethods,
ModalDialog
},
+ props: {
+ hasPaymentChanged: {
+ type: Boolean,
+ default: false
+ }
+ },
emits: ['emit-bcol-info'],
setup (props, { emit, root }) {
const orgStore = useOrgStore()
@@ -127,7 +133,7 @@ export default defineComponent({
savedOrganizationType: '',
selectedPaymentMethod: '',
padInfo: {} as PADInfo,
- isBtnSaved: false,
+ isBtnSaved: props.hasPaymentChanged,
disableSaveBtn: false,
errorMessage: '',
errorTitle: 'Payment Update Failed',
@@ -136,7 +142,7 @@ export default defineComponent({
isLoading: false,
padValid: false,
ejvValid: false,
- paymentMethodChanged: false,
+ paymentMethodChanged: props.hasPaymentChanged,
isFuturePaymentMethodAvailable: false, // set true if in between 3 days cooling period
isTOSandAcknowledgeCompleted: false // set true if TOS already accepted
})
diff --git a/auth-web/src/components/auth/common/PADInfoForm.vue b/auth-web/src/components/auth/common/PADInfoForm.vue
index 06918d8bb8..96ad8af50f 100644
--- a/auth-web/src/components/auth/common/PADInfoForm.vue
+++ b/auth-web/src/components/auth/common/PADInfoForm.vue
@@ -123,7 +123,7 @@
@change="emitPreAuthDebitInfo"
>
- {{ acknowledgementLabel }}
+ {{ acknowledgementLabel }}
@@ -136,6 +136,7 @@
,
acknowledgementLabel: ComputedRef,
- padInfoSubtitle: ComputedRef
+ padInfoSubtitle: ComputedRef,
+ acknowledgeColor: ComputedRef,
+ accountNumberRules: ComputedRef<((v: any) => true | string)[]>
}
export default defineComponent({
@@ -183,7 +186,8 @@ export default defineComponent({
isInitialAcknowledged: { type: Boolean, default: false },
isInitialTOSAccepted: { type: Boolean, default: false },
isTOSNeeded: { type: Boolean, default: true },
- padInformation: { default: () => { return {} as PADInfo } }
+ padInformation: { default: () => { return {} as PADInfo } },
+ checkErrors: { type: Boolean, default: false }
},
emits: ['emit-pre-auth-debit-info', 'is-pre-auth-debit-form-valid', 'is-pad-info-touched'],
setup (props, { emit }) {
@@ -227,20 +231,20 @@ export default defineComponent({
' (3) day confirmation period has ended.'
: 'This account will not be able to perform any transactions until the mandatory' +
' (3) day confirmation period has ended.'
+ }),
+ acknowledgeColor: computed((): string => props.checkErrors && !state.isAcknowledged ? 'error--text' : ''),
+ accountNumberRules: computed((): ((v: any) => true | string)[] => {
+ const rules: ((v: any) => true | string)[] = [
+ v => !!v || 'Account Number is required',
+ v => (v.length >= 7 && v.length <= 12) || 'Account Number should be between 7 to 12 digits'
+ ]
+ if (state.isTouched) {
+ rules.push(v => (!v.includes('X') || 'Edited payment information should not contain masked digits (i.e. XXX)'))
+ }
+ return rules
})
}) as unknown) as PADInfoFormState
- const accountNumberRules = computed((): ((v: any) => true | string)[] => {
- const rules: ((v: any) => true | string)[] = [
- v => !!v || 'Account Number is required',
- v => (v.length >= 7 && v.length <= 12) || 'Account Number should be between 7 to 12 digits'
- ]
- if (state.isTouched) {
- rules.push(v => (!v.includes('X') || 'Edited payment information should not contain masked digits (i.e. XXX)'))
- }
- return rules
- })
-
// emits
const emitIsPreAuthDebitFormValid = () => {
const acknowledge = (props.isAcknowledgeNeeded) ? state.isAcknowledged : true
@@ -298,7 +302,6 @@ export default defineComponent({
return {
accountMask,
- accountNumberRules,
institutionNumberRules,
transitNumberRules,
...toRefs(state),
@@ -334,4 +337,8 @@ export default defineComponent({
.help-btn {
margin-top: -2px;
}
+
+ .error--text ::v-deep .v-icon {
+ color: var(--v-error-base) !important;
+ }
diff --git a/auth-web/src/components/auth/common/PaymentMethods.vue b/auth-web/src/components/auth/common/PaymentMethods.vue
index 5cb3a2c229..477d16e065 100644
--- a/auth-web/src/components/auth/common/PaymentMethods.vue
+++ b/auth-web/src/components/auth/common/PaymentMethods.vue
@@ -17,7 +17,6 @@
class="payment-card py-8 px-8 mb-4 elevation-1"
:class="{'selected': isPaymentSelected(payment)}"
:data-test="`div-payment-${payment.type}`"
- @click="paymentMethodSelected(payment)"
>