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>
|
||||
<Form
|
||||
@submit="onSubmit"
|
||||
@invalid-submit="onInvalidSubmit"
|
||||
ref="theForm"
|
||||
v-slot="{ meta }"
|
||||
id="insurance-company">
|
||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
|
||||
<loadingModal ref="loadingModal" />
|
||||
<div class="container-fluid page-container-grouped-styles">
|
||||
<div class="row justify-content-center">
|
||||
|
|
@ -111,10 +106,6 @@ export default {
|
|||
: "";
|
||||
return accountNumber;
|
||||
},
|
||||
handleBeforeUnload() {
|
||||
const insuranceCompanyPage = document.getElementById("insurance-company");
|
||||
insuranceCompanyPage.parentElement.removeChild(insuranceCompanyPage);
|
||||
},
|
||||
arePagePrerequisitesValid() {
|
||||
return store.getters.order.payment.isInsurance === true;
|
||||
},
|
||||
|
|
@ -144,17 +135,20 @@ export default {
|
|||
billToAccountNumber,
|
||||
false
|
||||
);
|
||||
//Manually unmount component in case navigate to external application.
|
||||
window.addEventListener("beforeunload", this.handleBeforeUnload);
|
||||
//Reload page when navigate with browser back button
|
||||
window.addEventListener("pageshow", this.handlePageShow);
|
||||
|
||||
navigateToHeritageFunnel({
|
||||
shouldSaveSession: true,
|
||||
pageNameToLog: "insurance-company",
|
||||
});
|
||||
},
|
||||
handlePageShow() {
|
||||
window.location.reload();
|
||||
},
|
||||
},
|
||||
unmounted() {
|
||||
window.removeEventListener("beforeunload", this.handleBeforeUnload);
|
||||
window.removeEventListener("pageshow", this.handlePageShow);
|
||||
},
|
||||
components: {
|
||||
funnelHeader,
|
||||
|
|
|
|||
Loading…
Reference in a new issue