Merge branch 'release/2025.01.30' into feature/CASH-146
This commit is contained in:
commit
c313241d62
6 changed files with 63 additions and 69 deletions
|
|
@ -97,16 +97,16 @@ export default {
|
||||||
document.onkeydown = function (e) {
|
document.onkeydown = function (e) {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
// check session expired and initSession to recreate cookies
|
// check session expired and initSession to recreate cookies
|
||||||
if (analyticsMixin.methods.sessionExpired()) {
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
this.routeReturnUser();
|
this.routeReturnUser();
|
||||||
} else {
|
} else {
|
||||||
this.$emit("ForwardClicked");
|
this.$emit("ForwardClicked");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
linkClick() {
|
linkClick() {
|
||||||
// check session expired and initSession to recreate cookies
|
// check session expired and initSession to recreate cookies
|
||||||
if (analyticsMixin.methods.sessionExpired()) {
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
this.routeReturnUser();
|
this.routeReturnUser();
|
||||||
} else {
|
} else {
|
||||||
this.$emit("BackClicked");
|
this.$emit("BackClicked");
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,17 @@ export function getQuerystringParameter(key) {
|
||||||
|
|
||||||
return lowerCaseParams.get(key) ? lowerCaseParams.get(key) : null;
|
return lowerCaseParams.get(key) ? lowerCaseParams.get(key) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if you add the fmgPage to the querystringobject before calling, then pass true for skipFmgPageName
|
||||||
|
export function buildQuerystringObject(qso, skipFmgPageName=false) {
|
||||||
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
|
for (const [name, value] of urlParams) {
|
||||||
|
if (name.toLowerCase() === "fmgpage" && skipFmgPageName) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
qso[name] = value;
|
||||||
|
}
|
||||||
|
return qso;
|
||||||
|
}
|
||||||
|
|
@ -241,57 +241,46 @@ export default {
|
||||||
this.displayMismatchStateAndZipAlert = false;
|
this.displayMismatchStateAndZipAlert = false;
|
||||||
},
|
},
|
||||||
async setMobileLocation() {
|
async setMobileLocation() {
|
||||||
if (
|
this.resetAlerts();
|
||||||
this.internalModel.addressQuestions.zipCode !==
|
// Validate the Zip Code
|
||||||
this.modelValue.addressQuestions.zipCode
|
const zipCodeData = await this.getZipCodeData(
|
||||||
) {
|
this.internalModel.addressQuestions.zipCode,
|
||||||
this.resetAlerts();
|
"service-location"
|
||||||
// Validate the Zip Code
|
);
|
||||||
const zipCodeData = await this.getZipCodeData(
|
|
||||||
this.internalModel.addressQuestions.zipCode,
|
if (!zipCodeData.isValid) {
|
||||||
|
this.displayInvalidZipAlert = true;
|
||||||
|
this.resetModalButtonStyle();
|
||||||
|
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
||||||
|
this.displayMismatchStateAndZipAlert = true;
|
||||||
|
this.resetModalButtonStyle();
|
||||||
|
} else {
|
||||||
|
// retrieve mobile fee part
|
||||||
|
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
||||||
|
const mobileFeePart = await getPricedMobileFeePart(
|
||||||
|
serviceZipCode,
|
||||||
"service-location"
|
"service-location"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
// retrieve serviceability details
|
||||||
this.displayInvalidZipAlert = true;
|
const serviceabilityDetails = await getServiceabilityDetails(
|
||||||
this.resetModalButtonStyle();
|
serviceZipCode,
|
||||||
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
null,
|
||||||
this.displayMismatchStateAndZipAlert = true;
|
"service-location"
|
||||||
this.resetModalButtonStyle();
|
);
|
||||||
} else {
|
|
||||||
// retrieve mobile fee part
|
|
||||||
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
|
||||||
const mobileFeePart = await getPricedMobileFeePart(
|
|
||||||
serviceZipCode,
|
|
||||||
"service-location"
|
|
||||||
);
|
|
||||||
|
|
||||||
// retrieve serviceability details
|
const billToAccountNumber = await getBillToAccountNumber(
|
||||||
const serviceabilityDetails = await getServiceabilityDetails(
|
this.internalModel.zipCodeCtu
|
||||||
serviceZipCode,
|
);
|
||||||
null,
|
|
||||||
"service-location"
|
|
||||||
);
|
|
||||||
|
|
||||||
const billToAccountNumber = await getBillToAccountNumber(
|
// update content related to service zip code
|
||||||
this.internalModel.zipCodeCtu
|
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||||
);
|
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
||||||
|
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
||||||
|
this.$emit("updated-mobile-ctu", zipCodeData.zipCodeCtu);
|
||||||
|
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
||||||
|
|
||||||
// update content related to service zip code
|
// update the page level model
|
||||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
|
||||||
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
|
||||||
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
|
||||||
this.$emit("updated-mobile-ctu", zipCodeData.zipCodeCtu);
|
|
||||||
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
|
||||||
|
|
||||||
// update the page level model
|
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
|
||||||
|
|
||||||
//Page advance to Schedule page
|
|
||||||
this.$emit("mobileLocationSelected");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Update the page level model
|
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
this.$emit("update:modelValue", this.internalModel);
|
||||||
|
|
||||||
//Page advance to Schedule page
|
//Page advance to Schedule page
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export default {
|
||||||
// turned off Save Your Progress for 1/23/25 release
|
// turned off Save Your Progress for 1/23/25 release
|
||||||
// to restore, uncomment line below
|
// to restore, uncomment line below
|
||||||
// vm.showSaveProgressModal = !(emailFromStore?.length > 0);
|
// vm.showSaveProgressModal = !(emailFromStore?.length > 0);
|
||||||
|
|
||||||
// Glass Part Question dynamic component
|
// Glass Part Question dynamic component
|
||||||
Object.keys(vm.$refs)
|
Object.keys(vm.$refs)
|
||||||
.filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined)
|
.filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined)
|
||||||
|
|
|
||||||
|
|
@ -712,16 +712,10 @@ export default {
|
||||||
return !areAllSessionCookiesSet();
|
return !areAllSessionCookiesSet();
|
||||||
},
|
},
|
||||||
|
|
||||||
// sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the funnelSessionInfo cookie
|
// sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the vehicle year in vuex
|
||||||
sessionExpired() {
|
sessionExpired() {
|
||||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
if (this.noSession() && !fromHeritage && store.getters.order.vehicle?.year > 0) {
|
||||||
if (
|
|
||||||
this.noSession() &&
|
|
||||||
!fromHeritage &&
|
|
||||||
funnelCookieLastTouched !== null &&
|
|
||||||
funnelCookieLastTouched !== undefined
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"
|
||||||
import { routingTable } from "@/router/router-constants/routing-table.js";
|
import { routingTable } from "@/router/router-constants/routing-table.js";
|
||||||
import { globalEvents, globalEventTypes } from "@/constants/events";
|
import { globalEvents, globalEventTypes } from "@/constants/events";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
import { getQuerystringParameter, buildQuerystringObject } from "@/helpers/querystring-helper";
|
||||||
import { getDeviceIdValue } from "@/helpers/heritage-integration/cookie-helper";
|
import { getDeviceIdValue } from "@/helpers/heritage-integration/cookie-helper";
|
||||||
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
||||||
import { fmgPageValues, funnelStartPageName } from "@/router/router-constants/fmgPage-values";
|
import { fmgPageValues, funnelStartPageName } from "@/router/router-constants/fmgPage-values";
|
||||||
|
|
@ -101,27 +101,24 @@ const routes = [
|
||||||
}
|
}
|
||||||
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
||||||
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
||||||
// if entering the funnel from the content site, check and see if there is already a funnel cookie.
|
// if entering the funnel from the content site, check and see if there is already a vehicle year in vuex.
|
||||||
// if so, send them to return-user page.
|
// if so, send them to return-user page.
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
|
||||||
if (
|
if (
|
||||||
fromContentSite &&
|
fromContentSite &&
|
||||||
funnelCookieLastTouched !== null &&
|
!toReturnUserPage &&
|
||||||
funnelCookieLastTouched !== undefined &&
|
store.getters.order.vehicle?.year > 0
|
||||||
!toReturnUserPage
|
|
||||||
) {
|
) {
|
||||||
log(" --from content site navigate to return user");
|
log(" --from content site navigate to return user");
|
||||||
var qso = {
|
var qso = {
|
||||||
fmgPage: fmgPageValues.RETURN_USER,
|
fmgPage: fmgPageValues.RETURN_USER,
|
||||||
};
|
};
|
||||||
const lg = getQuerystringParameter(queryStrings.LOG);
|
|
||||||
if (lg) {
|
const newQueryString = buildQuerystringObject(qso, true);
|
||||||
qso[queryStrings.LOG] = true;
|
log(" -- returnUser add querystring: " + JSON.stringify(newQueryString));
|
||||||
}
|
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
path: "/",
|
path: "/",
|
||||||
query: Object.assign({}, qso),
|
query: Object.assign({}, newQueryString),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue