From d2bede5c940880050b3aaee3d84a7451658d523e Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 30 Oct 2024 14:52:07 -0700 Subject: [PATCH] 24004 - update paymentMethodChanged when settings bcolInfo, fix error handling (#3132) --- auth-web/package-lock.json | 4 ++-- auth-web/package.json | 2 +- .../auth/account-settings/payment/AccountPaymentMethods.vue | 5 +++-- auth-web/src/components/auth/create-account/BcolLogin.vue | 4 ++-- .../components/auth/create-account/PaymentMethodSelector.vue | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index 1808c61c1e..2d0950de70 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.6.103", + "version": "2.6.104", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.6.103", + "version": "2.6.104", "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 d2533f9d34..09e567015c 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.6.103", + "version": "2.6.104", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, 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 1a0ecfd1ba..f215c16b02 100644 --- a/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue +++ b/auth-web/src/components/auth/account-settings/payment/AccountPaymentMethods.vue @@ -373,10 +373,10 @@ export default defineComponent({ state.paymentMethodChanged = false switch (error.response.status) { case 409: - state.errorMessage = error.response.data.message + state.errorMessage = error.response.data.message?.detail || error.response.data.message break case 400: - state.errorMessage = error.response.data.message + state.errorMessage = error.response.data.message?.detail || error.response.data.message break default: state.errorMessage = 'An error occurred while attempting to create your account.' @@ -392,6 +392,7 @@ export default defineComponent({ function setBcolInfo (bcolProfile: BcolProfile) { state.bcolInfo = bcolProfile emit('emit-bcol-info', state.bcolInfo) + state.paymentMethodChanged = true } onMounted(async () => { diff --git a/auth-web/src/components/auth/create-account/BcolLogin.vue b/auth-web/src/components/auth/create-account/BcolLogin.vue index 5636dd5a01..a0f00fc41f 100644 --- a/auth-web/src/components/auth/create-account/BcolLogin.vue +++ b/auth-web/src/components/auth/create-account/BcolLogin.vue @@ -159,10 +159,10 @@ export default class BcolLogin extends Vue { this.isLoading = false switch (err.response.status) { case 409: - this.errorMessage = err.response.data.message + this.errorMessage = err.response.data.message?.detail || err.response.data.message break case 400: - this.errorMessage = err.response.data.message + this.errorMessage = err.response.data.message?.detail || err.response.data.message break default: this.errorMessage = 'An error occurred while attempting to create your account.' diff --git a/auth-web/src/components/auth/create-account/PaymentMethodSelector.vue b/auth-web/src/components/auth/create-account/PaymentMethodSelector.vue index 6bd297eb8b..47d958ce89 100644 --- a/auth-web/src/components/auth/create-account/PaymentMethodSelector.vue +++ b/auth-web/src/components/auth/create-account/PaymentMethodSelector.vue @@ -159,7 +159,7 @@ export default defineComponent({ case 409: break case 400: - errorMessage.value = err.response.data.message + errorMessage.value = err.response.data.message?.detail || err.response.data.message break default: errorMessage.value = 'An error occurred while attempting to create your account.'