carrier phone number on frontend

This commit is contained in:
Katie Kroell 2024-02-26 11:33:14 -05:00
parent 9465c49012
commit 18093c1885
3 changed files with 14 additions and 2 deletions

View file

@ -99,6 +99,10 @@ const endpoints = Object.freeze({
url: '/vehicle/api/v1/vehicle/lookup', url: '/vehicle/api/v1/vehicle/lookup',
method: 'GET' method: 'GET'
}, },
GetAccountInfo: {
url: '/account/api/v1/account/',
method: 'GET'
},
LogExperimentExposureIfAssigned: { LogExperimentExposureIfAssigned: {
url: '/experiments/api/v1/experiments/log-exposure', url: '/experiments/api/v1/experiments/log-exposure',
method: 'POST' method: 'POST'

View file

@ -161,9 +161,10 @@ export default {
isVerified() { isVerified() {
return useMainStore().order.payment.insuranceCoverage.isVerified; return useMainStore().order.payment.insuranceCoverage.isVerified;
}, },
// TODO: Replace with actual carrier number when account service is ready
carrierPhoneNumber() { carrierPhoneNumber() {
return '800-000-0000'; const accountInfo = useMainStore().getClientAccountInfo();
const { phoneNumber } = accountInfo;
return phoneNumber;
}, },
carrierName() { carrierName() {
return this.mainStore.issConfig.clientName; return this.mainStore.issConfig.clientName;

View file

@ -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() { async getSupportingItems() {
const glassPartsArray = this.order.lineItems.glassParts ?? []; const glassPartsArray = this.order.lineItems.glassParts ?? [];
const { carId } = this.order.vehicle; const { carId } = this.order.vehicle;