diff --git a/src/layouts/duplicate-check/duplicate-check.vue b/src/layouts/duplicate-check/duplicate-check.vue index b390e92d..bf59405f 100644 --- a/src/layouts/duplicate-check/duplicate-check.vue +++ b/src/layouts/duplicate-check/duplicate-check.vue @@ -116,7 +116,7 @@ export default { const vehicle = !!o.vehicleYear && !!o.vehicleMake && !!o.vehicleModel ? `${o.vehicleYear} ${o.vehicleMake} ${o.vehicleModel}` : null; - const dateOfLoss = formatDate(new Date(useMainStore().order.policy.dateOfLoss), dupeCheckDateFormatter); + const dateOfLoss = formatDate(new Date(o.referralDate), dupeCheckDateFormatter); const subtext = vehicle ? `${vehicle}, ${dateOfLoss}` : (vehicle ?? '').concat(dateOfLoss); @@ -173,7 +173,7 @@ export default { try { // Call SaveSession to create referral. - if ( callSaveSession ) { + if (callSaveSession) { // SaveSession will bailout on error. await saveSession({ shouldAwaitSaveSessionQueue: true, bailoutOnError: true }); } @@ -187,15 +187,14 @@ export default { // Call getCoveragePolicyInfo to get the policy info. // GetCoveragePolicyInfo handles exception / error internally. We do not care if it fails, user continues in unverified path. await this.mainStore.getCoveragePolicyInfo(); - this.pushEventToGA("policy_search", "policy_found", this.mainStore.isPolicyLookupSuccessful ? "Yes" : "No", true); - if ( this.mainStore.isPolicyLookupSuccessful) { + if (this.mainStore.isPolicyLookupSuccessful) { this.pushEventToGA("zip_validation", "success", "N/A", true); } else { - if ( this.mainStore.order.policy.policyLookupErrorCode === 2) { + if (this.mainStore.order.policy.policyLookupErrorCode === 2) { this.pushEventToGA("zip_validation", "fail", "N/A", true); } }