Replacing most issConfig parent account numbers with order ones
This commit is contained in:
parent
d36adb401a
commit
550a1c8363
1 changed files with 15 additions and 9 deletions
|
|
@ -565,6 +565,10 @@ export const useMainStore = defineStore({
|
|||
this.updateCoverageType(coverageType.Deductible);
|
||||
const insured = responsePolicy.insureds?.[0];
|
||||
|
||||
// populate parent account number
|
||||
// todo confirm that this is the right policy
|
||||
order.parentAccountNumber = responsePolicy.parentAccountNumber;
|
||||
|
||||
// populate policy holder details from policy lookup
|
||||
order.customer.address.streetAddress = insured?.address;
|
||||
order.customer.address.city = insured?.city;
|
||||
|
|
@ -694,7 +698,7 @@ export const useMainStore = defineStore({
|
|||
endpoint: endpoints.FinalDeductible.url,
|
||||
payload: {
|
||||
referralCorrelationId: this.order.referralCorrelationId,
|
||||
accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '',
|
||||
accountNumber: this.order.parentAccountNumber?.toString() ?? '',
|
||||
endorsements: endorsementAnswersForPayload,
|
||||
manualGlassNames: manualGlassNamesArray,
|
||||
policyState: this.order.customer.address.state,
|
||||
|
|
@ -722,7 +726,7 @@ export const useMainStore = defineStore({
|
|||
|
||||
getDuplicateReferrals() {
|
||||
const params = new URLSearchParams({
|
||||
parentAccountNumber: this.issConfig.parentAccountNumber,
|
||||
parentAccountNumber: this.order.parentAccountNumber,
|
||||
customerPhoneNumber: this.order.contactInfo.servicePhone,
|
||||
policyNumber: this.order.policy.policyNumber,
|
||||
emailAddress: this.order.customer.emailAddress,
|
||||
|
|
@ -879,7 +883,7 @@ export const useMainStore = defineStore({
|
|||
endDate,
|
||||
applicationName: applicationConfig.APPLICATION_NAME,
|
||||
billToAccountNumber: this.billToAccountNumber,
|
||||
parentAccountNumber: this.issConfig.parentAccountNumber, // this.payment.parentAccountNumber,
|
||||
parentAccountNumber: order.parentAccountNumber, // this.payment.parentAccountNumber,
|
||||
carId: vehicle.carId,
|
||||
lineItems,
|
||||
glassPieces,
|
||||
|
|
@ -943,7 +947,7 @@ export const useMainStore = defineStore({
|
|||
shopAppointmentType,
|
||||
applicationName: applicationConfig.APPLICATION_NAME,
|
||||
billToAccountNumber: this.billToAccountNumber,
|
||||
parentAccountNumber: this.issConfig.parentAccountNumber, // this.payment.parentAccountNumber,
|
||||
parentAccountNumber: this.order.parentAccountNumber, // this.payment.parentAccountNumber,
|
||||
carId: vehicle.carId,
|
||||
lineItems,
|
||||
glassPieces,
|
||||
|
|
@ -1007,7 +1011,7 @@ export const useMainStore = defineStore({
|
|||
getProviders(serviceZipCode) {
|
||||
const { carId } = this.order.vehicle;
|
||||
const damageType = this.damage.isRepair ? 'Repair' : 'Replace';
|
||||
const { parentAccountNumber } = this.issConfig;
|
||||
const { parentAccountNumber } = this.order;
|
||||
const partsWithRecal = getTopLevelGlassPartsWithRecal(this.order.lineItems.glassParts);
|
||||
const windshieldPartWithRecal = partsWithRecal?.length > 0 ? partsWithRecal[0] : null;
|
||||
const safeliteOnly = true;
|
||||
|
|
@ -1026,7 +1030,7 @@ export const useMainStore = defineStore({
|
|||
getTpaProviders(zipCode, radius) {
|
||||
const { carId } = this.order.vehicle;
|
||||
const damageType = this.damage.isRepair ? 'Repair' : 'Replace';
|
||||
const { parentAccountNumber } = this.issConfig;
|
||||
const { parentAccountNumber } = this.order;
|
||||
const partsWithRecal = getTopLevelGlassPartsWithRecal(this.order.lineItems.glassParts);
|
||||
const windshieldPartWithRecal = partsWithRecal?.length > 0 ? partsWithRecal[0] : null;
|
||||
const safeliteOnly = false;
|
||||
|
|
@ -1047,7 +1051,7 @@ export const useMainStore = defineStore({
|
|||
return new Promise((resolve, reject) => {
|
||||
globalMethods.callHttpClient({
|
||||
method: endpoints.GetAccountInfo.method,
|
||||
endpoint: endpoints.GetAccountInfo.url + this.issConfig.parentAccountNumber
|
||||
endpoint: endpoints.GetAccountInfo.url + this.order.parentAccountNumber
|
||||
}).then((response) => {
|
||||
this.order.carrierPhoneNumber = response.data.phoneNumber;
|
||||
return resolve(response.data);
|
||||
|
|
@ -1130,6 +1134,7 @@ export const useMainStore = defineStore({
|
|||
endpoint: `${endpoints.GetGlassFees.url}?${params.toString()}${partNumberListQueryString}`
|
||||
});
|
||||
},
|
||||
// TODO do we even use this anymore?
|
||||
async getSupportingItems() {
|
||||
const { glassParts } = this.lineItems;
|
||||
const { carId } = this.vehicle;
|
||||
|
|
@ -1458,7 +1463,7 @@ export const useMainStore = defineStore({
|
|||
claimNumber: insuranceCoverage.claimNumber
|
||||
},
|
||||
payment: {
|
||||
parentAccountNumber: this.issConfig.parentAccountNumber,
|
||||
parentAccountNumber: this.order.payment.parentAccountNumber,
|
||||
billToAccountNumber: this.billToAccountNumber,
|
||||
paypalToken: payment.paypalToken,
|
||||
paymentMethod: payment.paymentMethod === paymentMethods.PayNow ? null : payment.paymentMethod,
|
||||
|
|
@ -1556,6 +1561,7 @@ export const useMainStore = defineStore({
|
|||
payload: {
|
||||
referralNumber: duplicate.referralNumber,
|
||||
referralDate: duplicate.responseDate,
|
||||
// TODO confirm this is right to use here
|
||||
parentAccountNumber: issConfig.parentAccountNumber,
|
||||
referralCorrelationId: duplicate.correlationId
|
||||
}
|
||||
|
|
@ -2649,7 +2655,7 @@ export const useMainStore = defineStore({
|
|||
const { order, issConfig } = this;
|
||||
try {
|
||||
const params = new URLSearchParams({
|
||||
parentAccountNumber: issConfig.parentAccountNumber.toString(),
|
||||
parentAccountNumber: order.parentAccountNumber.toString(),
|
||||
providerNumber: this.providerNumber,
|
||||
typeOfClaim: 'GLASS ONLY',
|
||||
lineOfBusiness: 'PERSONAL',
|
||||
|
|
|
|||
Loading…
Reference in a new issue