Merge pull request #2108 from Safelite/Feature/Digital/CSR-2066
CSR-2066
This commit is contained in:
commit
82729bb411
1 changed files with 7 additions and 13 deletions
|
|
@ -1,10 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<Form
|
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
|
||||||
@submit="onSubmit"
|
|
||||||
@invalid-submit="onInvalidSubmit"
|
|
||||||
ref="theForm"
|
|
||||||
v-slot="{ meta }"
|
|
||||||
id="insurance-company">
|
|
||||||
<loadingModal ref="loadingModal" />
|
<loadingModal ref="loadingModal" />
|
||||||
<div class="container-fluid page-container-grouped-styles">
|
<div class="container-fluid page-container-grouped-styles">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
@ -111,10 +106,6 @@ export default {
|
||||||
: "";
|
: "";
|
||||||
return accountNumber;
|
return accountNumber;
|
||||||
},
|
},
|
||||||
handleBeforeUnload() {
|
|
||||||
const insuranceCompanyPage = document.getElementById("insurance-company");
|
|
||||||
insuranceCompanyPage.parentElement.removeChild(insuranceCompanyPage);
|
|
||||||
},
|
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return store.getters.order.payment.isInsurance === true;
|
return store.getters.order.payment.isInsurance === true;
|
||||||
},
|
},
|
||||||
|
|
@ -144,17 +135,20 @@ export default {
|
||||||
billToAccountNumber,
|
billToAccountNumber,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
//Manually unmount component in case navigate to external application.
|
//Reload page when navigate with browser back button
|
||||||
window.addEventListener("beforeunload", this.handleBeforeUnload);
|
window.addEventListener("pageshow", this.handlePageShow);
|
||||||
|
|
||||||
navigateToHeritageFunnel({
|
navigateToHeritageFunnel({
|
||||||
shouldSaveSession: true,
|
shouldSaveSession: true,
|
||||||
pageNameToLog: "insurance-company",
|
pageNameToLog: "insurance-company",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handlePageShow() {
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
window.removeEventListener("beforeunload", this.handleBeforeUnload);
|
window.removeEventListener("pageshow", this.handlePageShow);
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue