Merge branch 'release/2026.05.07' into feature/CASH-2576
This commit is contained in:
commit
3c0925f253
11 changed files with 83 additions and 9 deletions
|
|
@ -15,6 +15,7 @@ const environmentVariables = {
|
||||||
['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "",
|
['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "",
|
||||||
['__VUE_APP_ADYEN_ENVIRONMENT__']: "test",
|
['__VUE_APP_ADYEN_ENVIRONMENT__']: "test",
|
||||||
['__VUE_APP_ADYEN_CLIENT_KEY__']: "test_WYGT4F5ZT5BRRL5MPWHK6QLYOIXZXROD",
|
['__VUE_APP_ADYEN_CLIENT_KEY__']: "test_WYGT4F5ZT5BRRL5MPWHK6QLYOIXZXROD",
|
||||||
|
['__VUE_APP_SESSION_EXPIRATION_INTERVAL_CHECK_MILLISECONDS__']: 60000,
|
||||||
};
|
};
|
||||||
|
|
||||||
const keysOnly = Object.keys(environmentVariables);
|
const keysOnly = Object.keys(environmentVariables);
|
||||||
|
|
|
||||||
22
src/App.vue
22
src/App.vue
|
|
@ -18,6 +18,8 @@ import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
||||||
import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer.vue";
|
import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer.vue";
|
||||||
import salesforceWebchat from "./digital-components/salesforce-webchat/salesforce-webchat.vue";
|
import salesforceWebchat from "./digital-components/salesforce-webchat/salesforce-webchat.vue";
|
||||||
import sierraWebchat from "./digital-components/sierra-webchat/sierra-webchat.vue";
|
import sierraWebchat from "./digital-components/sierra-webchat/sierra-webchat.vue";
|
||||||
|
import analyticsMixin from "@/mixins/analytics-mixin";
|
||||||
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "app",
|
name: "app",
|
||||||
|
|
@ -25,8 +27,18 @@ export default {
|
||||||
const { globalNonpersistedState } = showFmgLoadingModal();
|
const { globalNonpersistedState } = showFmgLoadingModal();
|
||||||
return { globalNonpersistedState };
|
return { globalNonpersistedState };
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
sessionCheckInterval: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleAnyComponentFocus: handleAnyComponentFocus,
|
handleAnyComponentFocus: handleAnyComponentFocus,
|
||||||
|
checkSessionAndRedirect() {
|
||||||
|
if (analyticsMixin.methods.sessionExpired()) {
|
||||||
|
this.$router.sendToReturnUser();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
shouldShowLoader() {
|
shouldShowLoader() {
|
||||||
|
|
@ -44,6 +56,16 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
showFmgLoadingModal(true);
|
showFmgLoadingModal(true);
|
||||||
|
// Check session expiration and redirect if expired
|
||||||
|
this.sessionCheckInterval = setInterval(
|
||||||
|
this.checkSessionAndRedirect,
|
||||||
|
applicationConfig.SESSION_EXPIRATION_INTERVAL_CHECK_MILLISECONDS
|
||||||
|
);
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
if (this.sessionCheckInterval) {
|
||||||
|
clearInterval(this.sessionCheckInterval);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ const applicationConfig = {
|
||||||
AFFILIATE_COOKIE_CONTAINING_NAME: "_Track",
|
AFFILIATE_COOKIE_CONTAINING_NAME: "_Track",
|
||||||
COOKIE_NAME_LENGTH_MAX_LIMIT: 44,
|
COOKIE_NAME_LENGTH_MAX_LIMIT: 44,
|
||||||
SESSION_TIMEOUT_MINUTES: process.env.__VUE_APP_SESSION_TIMEOUT_MINUTES__,
|
SESSION_TIMEOUT_MINUTES: process.env.__VUE_APP_SESSION_TIMEOUT_MINUTES__,
|
||||||
|
SESSION_EXPIRATION_INTERVAL_CHECK_MILLISECONDS:
|
||||||
|
process.env.__VUE_APP_SESSION_EXPIRATION_INTERVAL_CHECK_MILLISECONDS__,
|
||||||
RETURN_USER_PAGE: "/fmg/return-user",
|
RETURN_USER_PAGE: "/fmg/return-user",
|
||||||
ADYEN_CLIENT_KEY: process.env.__VUE_APP_ADYEN_CLIENT_KEY__,
|
ADYEN_CLIENT_KEY: process.env.__VUE_APP_ADYEN_CLIENT_KEY__,
|
||||||
ADYEN_ENVIRONMENT: process.env.__VUE_APP_ADYEN_ENVIRONMENT__,
|
ADYEN_ENVIRONMENT: process.env.__VUE_APP_ADYEN_ENVIRONMENT__,
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ const endpoints = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
},
|
},
|
||||||
GetMobileFeePart: {
|
GetMobileFeePart: {
|
||||||
url: "/parts/api/v1/parts/mobile-fee",
|
url: "/parts/api/v2/parts/mobile-fee",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
},
|
},
|
||||||
GetPricingByDayPart: {
|
GetPricingByDayPart: {
|
||||||
|
|
|
||||||
|
|
@ -962,7 +962,8 @@ export default {
|
||||||
return this.supportingItems.find(
|
return this.supportingItems.find(
|
||||||
(lineItem) =>
|
(lineItem) =>
|
||||||
lineItem.partType == partTypeStrings.MOBILE_FEE &&
|
lineItem.partType == partTypeStrings.MOBILE_FEE &&
|
||||||
lineItem.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE
|
(lineItem.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE ||
|
||||||
|
lineItem.partNumber == partNumberStrings.MOBILE_DUAL_RECAL_FEE)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
msrFeeCartItem() {
|
msrFeeCartItem() {
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export function getSideDoorGlassString(glassLocation, glassName) {
|
||||||
export function getDamageInfoWordingText(damageInfo) {
|
export function getDamageInfoWordingText(damageInfo) {
|
||||||
const glassTextArray = [];
|
const glassTextArray = [];
|
||||||
|
|
||||||
damageInfo.glassToReplace.forEach((item) => {
|
damageInfo.glassToReplace?.forEach((item) => {
|
||||||
let string = "";
|
let string = "";
|
||||||
if (item.glassLocation === glassLocations.WINDSHIELD) {
|
if (item.glassLocation === glassLocations.WINDSHIELD) {
|
||||||
string = item.glassLocation;
|
string = item.glassLocation;
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,9 @@ export async function getPricingByDayPartWithPrice(pageNameToLog) {
|
||||||
export function getMSRFeePartPrice(supportingItems, includeTax) {
|
export function getMSRFeePartPrice(supportingItems, includeTax) {
|
||||||
let msrFeePrice = 0;
|
let msrFeePrice = 0;
|
||||||
const msrFeeLineItem = supportingItems?.find(
|
const msrFeeLineItem = supportingItems?.find(
|
||||||
(lineItem) => lineItem.partNumber === partNumberStrings.MOBILE_STATIC_RECAL_FEE
|
(lineItem) =>
|
||||||
|
lineItem.partNumber === partNumberStrings.MOBILE_STATIC_RECAL_FEE ||
|
||||||
|
lineItem.partNumber === partNumberStrings.MOBILE_DUAL_RECAL_FEE
|
||||||
);
|
);
|
||||||
if (msrFeeLineItem) {
|
if (msrFeeLineItem) {
|
||||||
msrFeePrice = baseMixin?.methods?.getTotalPriceOfAllLineItemsAndChildParts(
|
msrFeePrice = baseMixin?.methods?.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ import { createAdyenCheckout } from "@/helpers/adyen-helper";
|
||||||
import { Dropin } from "@adyen/adyen-web/auto";
|
import { Dropin } from "@adyen/adyen-web/auto";
|
||||||
import { applicationConfig } from "@/constants/application-config";
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
import { paymentMethods } from "@/constants/payment-method-constants";
|
import { paymentMethods } from "@/constants/payment-method-constants";
|
||||||
|
import analyticsMixin from "@/mixins/analytics-mixin";
|
||||||
|
|
||||||
import "@adyen/adyen-web/styles/adyen.css";
|
import "@adyen/adyen-web/styles/adyen.css";
|
||||||
import { mapAdyenToFmgPaymentMethod, mapFmgToAdyenPaymentMethod } from "../../helpers/adyen-helper";
|
import { mapAdyenToFmgPaymentMethod, mapFmgToAdyenPaymentMethod } from "../../helpers/adyen-helper";
|
||||||
|
|
@ -133,6 +134,25 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
async initializeAdyenWithErrorHandling() {
|
||||||
|
try {
|
||||||
|
await this.initializeAdyen();
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Failed to initialize Adyen payment:", error);
|
||||||
|
|
||||||
|
const errorJson = JSON.stringify(error, Object.getOwnPropertyNames(Object(error)));
|
||||||
|
analyticsMixin.methods.pushFmgSessionData(errorJson);
|
||||||
|
await global.$logger.logError(errorJson);
|
||||||
|
|
||||||
|
this.$router.navigateWithoutSaving(
|
||||||
|
this.navigationScenarios.PIA_ERROR,
|
||||||
|
this.pageName
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async backButtonAction() {
|
async backButtonAction() {
|
||||||
// Stub, for navigating back via nav-bar.
|
// Stub, for navigating back via nav-bar.
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(
|
||||||
|
|
@ -203,6 +223,12 @@ export default {
|
||||||
},
|
},
|
||||||
onError: (error, component) => {
|
onError: (error, component) => {
|
||||||
console.log(`Error from Adyen`);
|
console.log(`Error from Adyen`);
|
||||||
|
const errorJson = JSON.stringify(
|
||||||
|
error,
|
||||||
|
Object.getOwnPropertyNames(Object(error))
|
||||||
|
);
|
||||||
|
analyticsMixin.methods.pushFmgSessionData(errorJson);
|
||||||
|
|
||||||
this.handleError(error);
|
this.handleError(error);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -371,7 +397,12 @@ export default {
|
||||||
|
|
||||||
await global.$logger.logError(stringToLog);
|
await global.$logger.logError(stringToLog);
|
||||||
|
|
||||||
this.hasPaymentFailureError = true;
|
this.$router.navigateWithoutSaving(
|
||||||
|
this.navigationScenarios.PIA_ERROR,
|
||||||
|
this.pageName
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dropinComponent?.update();
|
this.dropinComponent?.update();
|
||||||
|
|
@ -566,7 +597,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initializeAdyen();
|
this.initializeAdyenWithErrorHandling();
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -706,10 +706,16 @@ export default {
|
||||||
isMobileStaticRecalibrationApplicable() {
|
isMobileStaticRecalibrationApplicable() {
|
||||||
return (
|
return (
|
||||||
this.displayMSR &&
|
this.displayMSR &&
|
||||||
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
|
this.isMSRFeePartNumber &&
|
||||||
(this.enableMSRSplitPay || this.isCashItacNoComp || this.mobileFeePart?.isInsurable)
|
(this.enableMSRSplitPay || this.isCashItacNoComp || this.mobileFeePart?.isInsurable)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
isMSRFeePartNumber() {
|
||||||
|
return (
|
||||||
|
this.mobileFeePart?.partNumber === partNumberStrings.MOBILE_STATIC_RECAL_FEE ||
|
||||||
|
this.mobileFeePart?.partNumber === partNumberStrings.MOBILE_DUAL_RECAL_FEE
|
||||||
|
);
|
||||||
|
},
|
||||||
displayMSR() {
|
displayMSR() {
|
||||||
return (
|
return (
|
||||||
experimentMixin.methods
|
experimentMixin.methods
|
||||||
|
|
|
||||||
|
|
@ -160,12 +160,16 @@ export default {
|
||||||
// and aws FireHose stream, DigitalConsumer-Session-Firehose, to push data to an
|
// and aws FireHose stream, DigitalConsumer-Session-Firehose, to push data to an
|
||||||
// S3 bucket, safelite-dev-digitalconsumer-session-data-us-east-2/1.
|
// S3 bucket, safelite-dev-digitalconsumer-session-data-us-east-2/1.
|
||||||
// This bucket data is then picked up by snowflake for analytics use.
|
// This bucket data is then picked up by snowflake for analytics use.
|
||||||
async pushFmgSessionData() {
|
async pushFmgSessionData(errorJson = null) {
|
||||||
var currentPageName = getPageNameFromRouter(true);
|
var currentPageName = getPageNameFromRouter(true);
|
||||||
if (!currentPageName) {
|
if (!currentPageName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (errorJson) {
|
||||||
|
currentPageName += ` ERROR: ${errorJson}`;
|
||||||
|
}
|
||||||
|
|
||||||
const hasSubmittedOrder = baseMixin.methods.hasSubmittedOrder();
|
const hasSubmittedOrder = baseMixin.methods.hasSubmittedOrder();
|
||||||
const submittedOrder = baseMixin.methods.getSubmittedOrder();
|
const submittedOrder = baseMixin.methods.getSubmittedOrder();
|
||||||
const order = hasSubmittedOrder ? submittedOrder : store.getters.order;
|
const order = hasSubmittedOrder ? submittedOrder : store.getters.order;
|
||||||
|
|
@ -209,6 +213,7 @@ export default {
|
||||||
var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
|
var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
|
||||||
|
|
||||||
var sessionData = {};
|
var sessionData = {};
|
||||||
|
|
||||||
sessionData.currentPage = currentPageName;
|
sessionData.currentPage = currentPageName;
|
||||||
sessionData.sid = getSessionIdValue();
|
sessionData.sid = getSessionIdValue();
|
||||||
sessionData.deviceId = getDeviceIdValue();
|
sessionData.deviceId = getDeviceIdValue();
|
||||||
|
|
@ -931,6 +936,11 @@ function getPageNameFromRouter(useDefaultUrl = false) {
|
||||||
router.currentRoute.value &&
|
router.currentRoute.value &&
|
||||||
router.currentRoute.value.name
|
router.currentRoute.value.name
|
||||||
) {
|
) {
|
||||||
|
const query = router.currentRoute.value.query;
|
||||||
|
if (query && Object.keys(query).length > 0 && useDefaultUrl === true) {
|
||||||
|
const queryString = new URLSearchParams(query).toString();
|
||||||
|
return `${router.currentRoute.value.name}?${queryString}`;
|
||||||
|
}
|
||||||
return router.currentRoute.value.name;
|
return router.currentRoute.value.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ export const autoRouteTable = [
|
||||||
routeData.MOLDING_QUESTIONS,
|
routeData.MOLDING_QUESTIONS,
|
||||||
routeData.VEHICLE_PARTS,
|
routeData.VEHICLE_PARTS,
|
||||||
routeData.PART_QUESTIONS,
|
routeData.PART_QUESTIONS,
|
||||||
routeData.VIN_LOOKUP,
|
|
||||||
routeData.ESTIMATE,
|
routeData.ESTIMATE,
|
||||||
routeData.VEHICLE_DAMAGE,
|
routeData.VEHICLE_DAMAGE,
|
||||||
routeData.VEHICLE,
|
routeData.VEHICLE,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue