Initial loss report number changes for USAA.
This commit is contained in:
parent
f9a5bd58dd
commit
f7b753a4af
1 changed files with 32 additions and 7 deletions
|
|
@ -172,7 +172,8 @@ export const getDefaultState = () => ({
|
||||||
coverageStatus: coverageStatuses.PENDING,
|
coverageStatus: coverageStatuses.PENDING,
|
||||||
coverageType: coverageType.NONE,
|
coverageType: coverageType.NONE,
|
||||||
isItacOptimized: false,
|
isItacOptimized: false,
|
||||||
claimNumber: null
|
claimNumber: null,
|
||||||
|
lossReportNumber: null
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
parentAccountNumber: 0,
|
parentAccountNumber: 0,
|
||||||
|
|
@ -736,13 +737,31 @@ export const useMainStore = defineStore({
|
||||||
bailoutOnError: false
|
bailoutOnError: false
|
||||||
});
|
});
|
||||||
this.order.insuranceCoverage.claimNumber = response.data.claimNumber;
|
this.order.insuranceCoverage.claimNumber = response.data.claimNumber;
|
||||||
if (response.data.isSuccess) {
|
console.error("Register Claim - Claim Number: ", this.order.insuranceCoverage.claimNumber);
|
||||||
this.updateCoverageStatus(coverageStatuses.VERIFIED);
|
|
||||||
} else {
|
// If register claim at end, then we have loss report number we need to populate.
|
||||||
this.updateCoverageStatus(coverageStatuses.NO_COVERAGE);
|
if ( this.issConfig.callClaimRegistrationAtEnd ) {
|
||||||
|
if ( response.data.additionalFields?.lossReportNum ) {
|
||||||
|
// Update member number if it is returned.
|
||||||
|
this.order.policy.memberNumber = response.data.additionalFields.memberNum;
|
||||||
|
this.order.insuranceCoverage.lossReportNumber = response.data.additionalFields.lossReportNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Only set coverage statuses if we are not calling claim registration at end of flow.
|
||||||
|
if (response.data.isSuccess) {
|
||||||
|
this.updateCoverageStatus(coverageStatuses.VERIFIED);
|
||||||
|
} else {
|
||||||
|
this.updateCoverageStatus(coverageStatuses.NO_COVERAGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.updateCoverageStatus(coverageStatuses.NO_COVERAGE);
|
// Only set coverage statuses if we are not calling claim registration at end of flow.
|
||||||
|
if ( !this.issConfig.callClaimRegistrationAtEnd ) {
|
||||||
|
this.updateCoverageStatus(coverageStatuses.NO_COVERAGE);
|
||||||
|
}
|
||||||
|
console.error("Claim number cleared due to error during claim registration: ", e);
|
||||||
this.order.insuranceCoverage.claimNumber = null;
|
this.order.insuranceCoverage.claimNumber = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1534,6 +1553,9 @@ export const useMainStore = defineStore({
|
||||||
const payloadVapsItems = setClearOnSubmit(lineItems.vaps, false);
|
const payloadVapsItems = setClearOnSubmit(lineItems.vaps, false);
|
||||||
const payloadFeeItems = setClearOnSubmit(lineItems.feeItems, shouldClearOnSubmit);
|
const payloadFeeItems = setClearOnSubmit(lineItems.feeItems, shouldClearOnSubmit);
|
||||||
|
|
||||||
|
|
||||||
|
console.error("Save Session - Claim Number: ", insuranceCoverage.claimNumber);
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
applicationUser: {
|
applicationUser: {
|
||||||
crmCustomerId: this.applicationUser.crmCustomerId,
|
crmCustomerId: this.applicationUser.crmCustomerId,
|
||||||
|
|
@ -1609,7 +1631,8 @@ export const useMainStore = defineStore({
|
||||||
insuranceCoverage: {
|
insuranceCoverage: {
|
||||||
coverageType: insuranceCoverage.coverageType,
|
coverageType: insuranceCoverage.coverageType,
|
||||||
coverageStatus: insuranceCoverage.coverageStatus,
|
coverageStatus: insuranceCoverage.coverageStatus,
|
||||||
claimNumber: insuranceCoverage.claimNumber
|
claimNumber: insuranceCoverage.claimNumber,
|
||||||
|
lossReportNumber: insuranceCoverage.lossReportNumber
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
parentAccountNumber: this.order.parentAccountNumber ?? this.issConfig.parentAccountNumber,
|
parentAccountNumber: this.order.parentAccountNumber ?? this.issConfig.parentAccountNumber,
|
||||||
|
|
@ -2038,7 +2061,9 @@ export const useMainStore = defineStore({
|
||||||
this.order.insuranceCoverage.coverageStatus = coverageStatuses.PENDING;
|
this.order.insuranceCoverage.coverageStatus = coverageStatuses.PENDING;
|
||||||
this.order.insuranceCoverage.coverageType = coverageType.NONE;
|
this.order.insuranceCoverage.coverageType = coverageType.NONE;
|
||||||
this.order.insuranceCoverage.isItacOptimized = false;
|
this.order.insuranceCoverage.isItacOptimized = false;
|
||||||
|
console.error("Reset Insurance called.");
|
||||||
this.order.insuranceCoverage.claimNumber = null;
|
this.order.insuranceCoverage.claimNumber = null;
|
||||||
|
this.order.insuranceCoverage.lossReportNumber = null;
|
||||||
},
|
},
|
||||||
updateGlassFees(feeData) {
|
updateGlassFees(feeData) {
|
||||||
if (feeData == null) {
|
if (feeData == null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue