Merge pull request #2234 from Safelite/rlsmerge/2025.01.23-to-develop
Rlsmerge/2025.01.23 to develop
This commit is contained in:
commit
435b0e1633
9 changed files with 50 additions and 57 deletions
|
|
@ -226,7 +226,7 @@ export default {
|
|||
if (this.buttonTypeString == "radio") {
|
||||
classes += " radio-button-container";
|
||||
} else if (this.buttonTypeString == "servicePackageRadio") {
|
||||
classes = "package-wrapper col-md-4";
|
||||
classes = "package-wrapper col";
|
||||
}
|
||||
|
||||
if (this.buttonTypeString == "listCard" && this.buttonsInfo.length > 2) {
|
||||
|
|
|
|||
|
|
@ -99,9 +99,6 @@ export default {
|
|||
// hide save progress button; show success message alert
|
||||
this.isProgressSaved = true;
|
||||
|
||||
// communicate to parent the new status
|
||||
this.$emit("save-progress-saved");
|
||||
|
||||
this.modal.closeModal();
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export default {
|
|||
position: relative;
|
||||
color: $black;
|
||||
border: none;
|
||||
border-radius: .25rem;
|
||||
border-radius: 0.25rem;
|
||||
font-weight: 900;
|
||||
font-size: 0.875rem;
|
||||
text-align: center;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-xl-8 mb-5">
|
||||
<div class="col-md-12 mb-5" :class="getColCount()">
|
||||
<servicePackageQuestion
|
||||
ref="servicePackage"
|
||||
cashCmsWidgetName="CashServicePackageQuestionWidget"
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
:shouldHideRecalibration="shouldHideRecalibration"
|
||||
@vapsItemsSelected="vapsItemsSelectedAction"
|
||||
@servicePackageDiscountSelected="servicePackageDiscountSelectedAction"
|
||||
@currentNumberOfPackages="currentNumberOfPackagesAction"
|
||||
:servicePackage="servicePackage"
|
||||
:activePromos="lineItems.promos"
|
||||
v-on="{ 'buttonEvent.openModal': openModalAction }"
|
||||
|
|
@ -40,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-xl-8 p-md-0">
|
||||
<div class="col-md-12" :class="getColCount()">
|
||||
<!-- If Cash AND vehicle does not require recal OR if Cash AND State requires showing recal, then show Afterpay banner -->
|
||||
<afterpayModalBanner
|
||||
v-if="showAfterpayBanner"
|
||||
|
|
@ -83,8 +84,7 @@
|
|||
modalWidgetName="SaveProgressModalWidget"
|
||||
modalName="SaveProgressModal"
|
||||
v-if="showSaveProgressModal"
|
||||
pageName="quote"
|
||||
@save-progress-saved="updateSaveProgressAsSaved" />
|
||||
pageName="quote" />
|
||||
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
|
|
@ -444,6 +444,7 @@ export default {
|
|||
showSaveProgressPopup: null,
|
||||
showSaveProgressModal: null,
|
||||
isSaveProgressComplete: null,
|
||||
packageNumber: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -493,6 +494,16 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
getColCount() {
|
||||
if (this.packageNumber > 2) {
|
||||
return "col-xl-8";
|
||||
} else {
|
||||
return "col-xl-6";
|
||||
}
|
||||
},
|
||||
currentNumberOfPackagesAction(packageNumber) {
|
||||
this.packageNumber = packageNumber;
|
||||
},
|
||||
openModalAction(modalName) {
|
||||
this.$refs[modalName].openModal();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ export default {
|
|||
: "Special: Save $" + this.getServicePackageDiscountPrice(),
|
||||
},
|
||||
}));
|
||||
this.$emit("currentNumberOfPackages", modifiedAnswers.length);
|
||||
return modifiedAnswers;
|
||||
},
|
||||
isServicePackageDiscountOnOrder() {
|
||||
|
|
|
|||
|
|
@ -141,6 +141,9 @@ export default {
|
|||
.package-main {
|
||||
.package-wrapper {
|
||||
margin: 1rem 0;
|
||||
&:first-child {
|
||||
margin: 1rem 0 0 0;
|
||||
}
|
||||
&:last-child {
|
||||
margin: 1rem 0 0 0;
|
||||
}
|
||||
|
|
@ -148,6 +151,12 @@ export default {
|
|||
margin: 1rem 0.5rem 0 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&:first-child {
|
||||
margin: 1rem 0.5rem 0 0;
|
||||
}
|
||||
&:last-child {
|
||||
margin: 1rem 0 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ import store from "@/store";
|
|||
import baseMixin from "@/mixins/base-mixin";
|
||||
import { applicationConfig } from "../constants/application-config";
|
||||
import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||
import router from "@/router/index.js";
|
||||
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
|
|
@ -714,14 +717,19 @@ export default {
|
|||
// The sid cookie for analytics will expire every 30 minutes and get recreated in initSession. If this happens
|
||||
// and we also have the funnel cookie present, that indicates they have an existing session that is now expired
|
||||
// so route them to the return user page.
|
||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||
if (
|
||||
this.noSession() &&
|
||||
!fromHeritage &&
|
||||
funnelCookieLastTouched !== null &&
|
||||
funnelCookieLastTouched !== undefined
|
||||
) {
|
||||
await this.initSession();
|
||||
window.location.href = applicationConfig.RETURN_USER_PAGE;
|
||||
router.push({
|
||||
path: "/",
|
||||
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,9 @@ const routes = [
|
|||
return;
|
||||
}
|
||||
|
||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||
const fromReturnUser = from?.name === fmgPageValues.RETURN_USER;
|
||||
const fromContentSite = getQuerystringParameter(queryStrings.START_TYPE) === "fmg";
|
||||
const toReturnUserPage = to.query?.fmgPage === fmgPageValues.RETURN_USER;
|
||||
|
||||
// Intercept all navigation if a submitted order exists in storage
|
||||
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
||||
|
|
@ -92,18 +93,20 @@ const routes = [
|
|||
}
|
||||
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
||||
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
||||
// if entering the funnel from non-funnel check and see if there is already a funnel cookie.
|
||||
// if so, send them to return-user page
|
||||
// if entering the funnel from the content site, check and see if there is already a funnel cookie.
|
||||
// if so, send them to return-user page.
|
||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||
if (
|
||||
to?.query?.fmgPage !== fmgPageValues.RETURN_USER &&
|
||||
!fromReturnUser &&
|
||||
!fromHeritage &&
|
||||
if (fromContentSite &&
|
||||
funnelCookieLastTouched !== null &&
|
||||
funnelCookieLastTouched !== undefined
|
||||
funnelCookieLastTouched !== undefined &&
|
||||
!toReturnUserPage
|
||||
) {
|
||||
log(" --navigate to return user");
|
||||
NavigateToReturnUser(next, to);
|
||||
log(" --from content site navigate to return user");
|
||||
router.push({
|
||||
path: "/",
|
||||
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// clear the saveSessionPromise - if it exists in the vuex store but a new instance was created
|
||||
|
|
@ -651,42 +654,6 @@ function GetRouteInfoFromPageName(pageName) {
|
|||
return routeData;
|
||||
}
|
||||
|
||||
async function NavigateToReturnUser(next, to) {
|
||||
const returnRoute = GetRouteInfoFromPageName(fmgPageValues.RETURN_USER);
|
||||
log("--returnRoute:", returnRoute);
|
||||
|
||||
if (router.hasRoute(to.query.fmgPage)) {
|
||||
// Since our route is already in scope, we can grab the component from it and call the arePagePrerequisitesValid function.
|
||||
let component = router
|
||||
.getRoutes()
|
||||
.filter((x) => x.name === fmgPageValues.RETURN_USER)[0].components;
|
||||
|
||||
log("--return-user component:", component);
|
||||
|
||||
// If the component hasn't been loaded fully, load it before we check prerequisites.
|
||||
if (component.default.methods === undefined) {
|
||||
component = await component.default();
|
||||
}
|
||||
|
||||
log(" --has route for return-user:", fmgPageValues.RETURN_USER);
|
||||
return next({ name: fmgPageValues.RETURN_USER, query: to.query, params: to.params });
|
||||
} else {
|
||||
log(" --add route for return-user:", fmgPageValues.RETURN_USER);
|
||||
router.addRoute({
|
||||
path: returnRoute[0].path, // Always the same path, because we control it with query strings.
|
||||
name: returnRoute[0].name,
|
||||
component: returnRoute[0].component,
|
||||
});
|
||||
|
||||
next({
|
||||
name: returnRoute[0].name,
|
||||
query: Object.assign(to.query, { fmgPage: returnRoute[0].name }),
|
||||
params: to.params,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Go to our start page on a 404.
|
||||
function GoToFunnelStartOn404(next, errorPayload = null) {
|
||||
if (errorPayload !== null) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
:class="[
|
||||
isPrimary ? 'btn-primary' : 'btn-secondary',
|
||||
isFloat ? 'float-end' : '',
|
||||
(isLoaderDisplayed && !suppressLoader) ? 'has-loader' : '',
|
||||
isLoaderDisplayed && !suppressLoader ? 'has-loader' : '',
|
||||
]"
|
||||
@click="clicked">
|
||||
<span class="m-0">{{ this.buttonText }}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue