From ca10097f4011351b7ac732bd5334e03a735c0e33 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Mon, 26 Feb 2024 12:01:38 -0500 Subject: [PATCH] final changes --- src/layouts/tpa-confirmation/tpa-confirmation.vue | 9 ++++----- src/store/index.js | 9 ++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/layouts/tpa-confirmation/tpa-confirmation.vue b/src/layouts/tpa-confirmation/tpa-confirmation.vue index f4c94be6..83776523 100644 --- a/src/layouts/tpa-confirmation/tpa-confirmation.vue +++ b/src/layouts/tpa-confirmation/tpa-confirmation.vue @@ -161,22 +161,21 @@ export default { isVerified() { return useMainStore().order.payment.insuranceCoverage.isVerified; }, - carrierPhoneNumber() { - const accountInfo = useMainStore().getClientAccountInfo(); - const { phoneNumber } = accountInfo; - return phoneNumber; - }, carrierName() { return this.mainStore.issConfig.clientName; }, carrierUrl() { return this.mainStore.issConfig.successReturnURL; + }, + carrierPhoneNumber() { + return this.toDisplayPhoneNumber(useMainStore().order.carrierPhoneNumber); } }, mounted() { if (this.carrierUrl) { this.$refs.siteFooter.updateButtonText(`Go back to ${this.carrierName}`); } + useMainStore().getCarrierAccountInfo(); }, methods: { diff --git a/src/store/index.js b/src/store/index.js index 06da1c35..f3d4336d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -175,7 +175,8 @@ const getDefaultState = () => ({ eon: null, workOrderNumber: null, originalDeductible: null, - currentDeductible: null + currentDeductible: null, + carrierPhoneNumber: null }, applicationUser: { experiments: [], @@ -925,11 +926,13 @@ export const useMainStore = defineStore({ }); }, - getClientAccountInfo() { - return globalMethods.callHttpClient({ + async getCarrierAccountInfo() { + const response = await globalMethods.callHttpClient({ method: endpoints.GetAccountInfo.method, endpoint: endpoints.GetAccountInfo.url + this.issConfig.parentAccountNumber }); + this.order.carrierPhoneNumber = response.data.phoneNumber; + return response; }, async getSupportingItems() {