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) {
|
||||
return false;
|
||||
};
|
||||
// check session expired and initSession to recreate cookies
|
||||
if (analyticsMixin.methods.sessionExpired()) {
|
||||
// check session expired and initSession to recreate cookies
|
||||
if (analyticsMixin.methods.sessionExpired()) {
|
||||
this.routeReturnUser();
|
||||
} else {
|
||||
this.$emit("ForwardClicked");
|
||||
}
|
||||
},
|
||||
linkClick() {
|
||||
// check session expired and initSession to recreate cookies
|
||||
if (analyticsMixin.methods.sessionExpired()) {
|
||||
// check session expired and initSession to recreate cookies
|
||||
if (analyticsMixin.methods.sessionExpired()) {
|
||||
this.routeReturnUser();
|
||||
} else {
|
||||
this.$emit("BackClicked");
|
||||
|
|
|
|||
|
|
@ -8,3 +8,17 @@ export function getQuerystringParameter(key) {
|
|||
|
||||
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;
|
||||
},
|
||||
async setMobileLocation() {
|
||||
if (
|
||||
this.internalModel.addressQuestions.zipCode !==
|
||||
this.modelValue.addressQuestions.zipCode
|
||||
) {
|
||||
this.resetAlerts();
|
||||
// Validate the Zip Code
|
||||
const zipCodeData = await this.getZipCodeData(
|
||||
this.internalModel.addressQuestions.zipCode,
|
||||
this.resetAlerts();
|
||||
// Validate the Zip Code
|
||||
const zipCodeData = await this.getZipCodeData(
|
||||
this.internalModel.addressQuestions.zipCode,
|
||||
"service-location"
|
||||
);
|
||||
|
||||
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"
|
||||
);
|
||||
|
||||
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"
|
||||
);
|
||||
// retrieve serviceability details
|
||||
const serviceabilityDetails = await getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
);
|
||||
|
||||
// retrieve serviceability details
|
||||
const serviceabilityDetails = await getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
);
|
||||
const billToAccountNumber = await getBillToAccountNumber(
|
||||
this.internalModel.zipCodeCtu
|
||||
);
|
||||
|
||||
const billToAccountNumber = await getBillToAccountNumber(
|
||||
this.internalModel.zipCodeCtu
|
||||
);
|
||||
// update content related to service zip code
|
||||
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
|
||||
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
|
||||
// update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
|
||||
//Page advance to Schedule page
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export default {
|
|||
// turned off Save Your Progress for 1/23/25 release
|
||||
// to restore, uncomment line below
|
||||
// vm.showSaveProgressModal = !(emailFromStore?.length > 0);
|
||||
|
||||
|
||||
// Glass Part Question dynamic component
|
||||
Object.keys(vm.$refs)
|
||||
.filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined)
|
||||
|
|
|
|||
|
|
@ -712,16 +712,10 @@ export default {
|
|||
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() {
|
||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||
if (
|
||||
this.noSession() &&
|
||||
!fromHeritage &&
|
||||
funnelCookieLastTouched !== null &&
|
||||
funnelCookieLastTouched !== undefined
|
||||
) {
|
||||
if (this.noSession() && !fromHeritage && store.getters.order.vehicle?.year > 0) {
|
||||
return true;
|
||||
} else {
|
||||
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 { globalEvents, globalEventTypes } from "@/constants/events";
|
||||
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 { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
||||
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.
|
||||
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.
|
||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||
if (
|
||||
fromContentSite &&
|
||||
funnelCookieLastTouched !== null &&
|
||||
funnelCookieLastTouched !== undefined &&
|
||||
!toReturnUserPage
|
||||
!toReturnUserPage &&
|
||||
store.getters.order.vehicle?.year > 0
|
||||
) {
|
||||
log(" --from content site navigate to return user");
|
||||
var qso = {
|
||||
fmgPage: fmgPageValues.RETURN_USER,
|
||||
};
|
||||
const lg = getQuerystringParameter(queryStrings.LOG);
|
||||
if (lg) {
|
||||
qso[queryStrings.LOG] = true;
|
||||
}
|
||||
|
||||
const newQueryString = buildQuerystringObject(qso, true);
|
||||
log(" -- returnUser add querystring: " + JSON.stringify(newQueryString));
|
||||
|
||||
router.push({
|
||||
path: "/",
|
||||
query: Object.assign({}, qso),
|
||||
query: Object.assign({}, newQueryString),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue