Merge pull request #2115 from Safelite/rlsmerge/2024.11.21-to-develop

Rlsmerge/2024.11.21 to develop
This commit is contained in:
CarlNation 2024-11-14 14:28:37 -05:00 committed by GitHub
commit 27985d982a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 20 deletions

View file

@ -9,7 +9,7 @@
aria-label="expand cart" aria-label="expand cart"
href="javascript:void(0)" href="javascript:void(0)"
class="col d-flex justify-content-between py-0"> class="col d-flex justify-content-between py-0">
<span class="label">{{ amountDueText }}</span> <span class="label">{{ OrderDetailsText }}</span>
<span class="label amount-due">{{ <span class="label amount-due">{{
getLineItemAmount(amountDue, showCoverageAsPending) getLineItemAmount(amountDue, showCoverageAsPending)
}}</span> }}</span>
@ -1015,6 +1015,9 @@ export default {
return this.getCmsContent("SalesTaxTextWidget", "Text"); return this.getCmsContent("SalesTaxTextWidget", "Text");
}, },
amountDueText() { amountDueText() {
return this.getCmsContent("AmountDueTextWidget", "Text");
},
OrderDetailsText() {
return this.getCmsContent("OrderDetailsTextWidget", "Text"); return this.getCmsContent("OrderDetailsTextWidget", "Text");
}, },
amountPaidText() { amountPaidText() {

View file

@ -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,

View file

@ -515,7 +515,11 @@ export default {
}, },
backButtonAction() { backButtonAction() {
const payment = store.getters.order.payment; const payment = store.getters.order.payment;
if (payment?.isInsurance && payment?.insuranceCoverage?.isVerified) { if (
payment?.isInsurance &&
(payment?.insuranceCoverage?.isVerified ||
store.getters.order.referralNumber.length === 6)
) {
navigateToHeritageFunnel({ shouldSaveSession: false }); navigateToHeritageFunnel({ shouldSaveSession: false });
} else { } else {
this.$router.navigateWithoutSaving( this.$router.navigateWithoutSaving(

View file

@ -398,7 +398,12 @@ export default {
}, },
methods: { methods: {
isDisabled(options) { isDisabled(options) {
if (!options.length || store.getters.payment?.insuranceCoverage?.isVerified) { if (
!options.length ||
store.getters.payment?.insuranceCoverage?.isVerified ||
(store.getters.order.payment?.isInsurance &&
getFunnelCookie().HasDelayedClaimRegistration)
) {
return true; return true;
} else { } else {
return false; return false;

View file

@ -826,10 +826,6 @@ export const getters = {
order = state.order; order = state.order;
} }
if (order.payment.isInsurance) {
return false;
}
return ( return (
experimentMixin.methods experimentMixin.methods
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE) .getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)