From 18093c18852fa8e888c70a4f23f4d0e772a945ee Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Mon, 26 Feb 2024 11:33:14 -0500 Subject: [PATCH] carrier phone number on frontend --- src/constants/endpoints.js | 4 ++++ src/layouts/tpa-confirmation/tpa-confirmation.vue | 5 +++-- src/store/index.js | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 60ef3ba8..de544f57 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -99,6 +99,10 @@ const endpoints = Object.freeze({ url: '/vehicle/api/v1/vehicle/lookup', method: 'GET' }, + GetAccountInfo: { + url: '/account/api/v1/account/', + method: 'GET' + }, LogExperimentExposureIfAssigned: { url: '/experiments/api/v1/experiments/log-exposure', method: 'POST' diff --git a/src/layouts/tpa-confirmation/tpa-confirmation.vue b/src/layouts/tpa-confirmation/tpa-confirmation.vue index 3741f4b8..f4c94be6 100644 --- a/src/layouts/tpa-confirmation/tpa-confirmation.vue +++ b/src/layouts/tpa-confirmation/tpa-confirmation.vue @@ -161,9 +161,10 @@ export default { isVerified() { return useMainStore().order.payment.insuranceCoverage.isVerified; }, - // TODO: Replace with actual carrier number when account service is ready carrierPhoneNumber() { - return '800-000-0000'; + const accountInfo = useMainStore().getClientAccountInfo(); + const { phoneNumber } = accountInfo; + return phoneNumber; }, carrierName() { return this.mainStore.issConfig.clientName; diff --git a/src/store/index.js b/src/store/index.js index 2b35d46d..fa1e57e9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -925,6 +925,13 @@ export const useMainStore = defineStore({ }); }, + getClientAccountInfo() { + return globalMethods.callHttpClient({ + method: endpoints.GetAccountInfo.method, + endpoint: endpoints.GetAccountInfo.url + this.issConfig.parentAccountNumber + }); + }, + async getSupportingItems() { const glassPartsArray = this.order.lineItems.glassParts ?? []; const { carId } = this.order.vehicle;