SSR-1167 [TEMP] Allow coverage rework to work with previous api models
This commit is contained in:
parent
fea90282fe
commit
e03da8d381
1 changed files with 19 additions and 5 deletions
|
|
@ -1269,7 +1269,9 @@ export const useMainStore = defineStore({
|
||||||
policyZipCode: policy.policyZipCode,
|
policyZipCode: policy.policyZipCode,
|
||||||
originalDeductible: this.order.originalDeductible,
|
originalDeductible: this.order.originalDeductible,
|
||||||
currentDeductible: this.order.currentDeductible,
|
currentDeductible: this.order.currentDeductible,
|
||||||
OemEndorsement: policy.endorsements?.indexOf('OEM Approved') !== -1 ?? false
|
OemEndorsement: policy.endorsements?.indexOf('OEM Approved') !== -1 ?? false,
|
||||||
|
noCoverage: this.isNoComp,
|
||||||
|
isItac: this.isITAC
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1304,7 +1306,12 @@ export const useMainStore = defineStore({
|
||||||
isPaypal: payment.payInAdvanceType === paymentMethods.PAYPAL,
|
isPaypal: payment.payInAdvanceType === paymentMethods.PAYPAL,
|
||||||
isCreditCard: payment.payInAdvanceType === paymentMethods.CREDIT_CARD,
|
isCreditCard: payment.payInAdvanceType === paymentMethods.CREDIT_CARD,
|
||||||
isAfterpay: payment.payInAdvanceType === paymentMethods.AFTERPAY,
|
isAfterpay: payment.payInAdvanceType === paymentMethods.AFTERPAY,
|
||||||
CCToken: payment.creditCardToken
|
CCToken: payment.creditCardToken,
|
||||||
|
insuranceCoverage: {
|
||||||
|
isVerified: this.isVerified,
|
||||||
|
coverageStatus: this.isNoComp ? coverageStatuses.NO_COVERAGE : this.isVerified ? coverageStatuses.VERIFIED : coverageStatuses.PENDING,
|
||||||
|
claimNumber: insuranceCoverage.claimNumber
|
||||||
|
}
|
||||||
},
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1403,9 +1410,16 @@ export const useMainStore = defineStore({
|
||||||
order.contactInfo.alternativePhone = data?.customer?.alternativePhone;
|
order.contactInfo.alternativePhone = data?.customer?.alternativePhone;
|
||||||
order.contactInfo.requestTextUpdates = data?.customer?.isSmsOptIn;
|
order.contactInfo.requestTextUpdates = data?.customer?.isSmsOptIn;
|
||||||
|
|
||||||
order.insuranceCoverage.coverageType = data?.insuranceCoverage?.coverageType;
|
if (data.insuranceCoverage) {
|
||||||
order.insuranceCoverage.coverageStatus = data?.insuranceCoverage?.coverageStatus;
|
order.insuranceCoverage.coverageType = data?.insuranceCoverage?.coverageType;
|
||||||
order.insuranceCoverage.claimNumber = data?.insuranceCoverage?.claimNumber;
|
order.insuranceCoverage.coverageStatus = data?.insuranceCoverage?.coverageStatus;
|
||||||
|
order.insuranceCoverage.claimNumber = data?.insuranceCoverage?.claimNumber;
|
||||||
|
} else if (data?.payment?.insuranceCoverage) {
|
||||||
|
if (data?.payment?.insuranceCoverage?.isVerified) {
|
||||||
|
order.insuranceCoverage.coverageStatus = coverageStatuses.VERIFIED;
|
||||||
|
}
|
||||||
|
order.insuranceCoverage.claimNumber = data?.payment?.insuranceCoverage?.claimNumber;
|
||||||
|
}
|
||||||
|
|
||||||
if (order.policy.vehicles.length !== 0 && data.vehicle?.carId) {
|
if (order.policy.vehicles.length !== 0 && data.vehicle?.carId) {
|
||||||
order.vehicle.registration.licensePlate = data?.vehicle?.licensePlateNumber;
|
order.vehicle.registration.licensePlate = data?.vehicle?.licensePlateNumber;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue