Added zip validation event.
This commit is contained in:
parent
fff491d0ad
commit
33c0526f1c
2 changed files with 22 additions and 2 deletions
|
|
@ -361,6 +361,15 @@ export default {
|
||||||
|
|
||||||
this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true);
|
this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true);
|
||||||
|
|
||||||
|
if ( this.mainStore.isPolicyLookupSuccessful) {
|
||||||
|
this.pushEventToGA("zip_validation", "success", "N/A", true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ( this.mainStore.order.policy.policyLookupErrorCode === 2) {
|
||||||
|
this.pushEventToGA("zip_validation", "fail", "N/A", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true })
|
await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true })
|
||||||
this.navigateForward();
|
this.navigateForward();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,8 @@ export const getDefaultState = () => ({
|
||||||
endorsements: [],
|
endorsements: [],
|
||||||
endorsementQuestionAnswers: [],
|
endorsementQuestionAnswers: [],
|
||||||
status: null,
|
status: null,
|
||||||
policyData: null
|
policyData: null,
|
||||||
|
policyLookupErrorCode: 0
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -595,10 +596,19 @@ export const useMainStore = defineStore({
|
||||||
|
|
||||||
// populate vehicles
|
// populate vehicles
|
||||||
order.policy.vehicles = responsePolicy.vehicles ?? [];
|
order.policy.vehicles = responsePolicy.vehicles ?? [];
|
||||||
} else {
|
|
||||||
|
order.policy.policyLookupErrorCode = 0;
|
||||||
|
} else {
|
||||||
|
if ( response?.data?.isError) {
|
||||||
|
order.policy.policyLookupErrorCode = response.data.errorCode;
|
||||||
|
}
|
||||||
this.updateCoverageType(coverageType.NONE);
|
this.updateCoverageType(coverageType.NONE);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if ( response?.data?.isError) {
|
||||||
|
order.policy.policyLookupErrorCode = response.data.errorCode;
|
||||||
|
}
|
||||||
|
|
||||||
this.updateCoverageType(coverageType.NONE);
|
this.updateCoverageType(coverageType.NONE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -2113,6 +2123,7 @@ export const useMainStore = defineStore({
|
||||||
this.order.policy.endorsements = [];
|
this.order.policy.endorsements = [];
|
||||||
this.order.policy.endorsementQuestionAnswers = [];
|
this.order.policy.endorsementQuestionAnswers = [];
|
||||||
this.order.policy.policyData = null;
|
this.order.policy.policyData = null;
|
||||||
|
this.order.policy.policyLookupErrorCode = 0;
|
||||||
this.order.policy.deductible.repair = null;
|
this.order.policy.deductible.repair = null;
|
||||||
this.order.policy.deductible.replace = null;
|
this.order.policy.deductible.replace = null;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue