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',
method: 'GET'
},
GetAccountInfo: {
url: '/account/api/v1/account/',
method: 'GET'
},
LogExperimentExposureIfAssigned: {
url: '/experiments/api/v1/experiments/log-exposure',
method: 'POST'

View file

@ -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;

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