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