Merge branch 'develop' into feature/CASH-2563

This commit is contained in:
Chris Redelinghuys 2026-05-06 09:22:37 -04:00
commit 1fb36e7ee7
8 changed files with 70 additions and 8 deletions

View file

@ -25,7 +25,7 @@ const endpoints = {
method: "GET",
},
GetDamageOptions: {
url: "/parts/api/v1/parts/damage-options",
url: "/parts/api/v2/parts/damage-options",
method: "GET",
},
LookupVehicleByYmms: {

View file

@ -962,7 +962,8 @@ export default {
return this.supportingItems.find(
(lineItem) =>
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() {

View file

@ -103,7 +103,7 @@ export function getSideDoorGlassString(glassLocation, glassName) {
export function getDamageInfoWordingText(damageInfo) {
const glassTextArray = [];
damageInfo.glassToReplace.forEach((item) => {
damageInfo.glassToReplace?.forEach((item) => {
let string = "";
if (item.glassLocation === glassLocations.WINDSHIELD) {
string = item.glassLocation;

View file

@ -108,7 +108,9 @@ export async function getPricingByDayPartWithPrice(pageNameToLog) {
export function getMSRFeePartPrice(supportingItems, includeTax) {
let msrFeePrice = 0;
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) {
msrFeePrice = baseMixin?.methods?.getTotalPriceOfAllLineItemsAndChildParts(

View file

@ -35,6 +35,7 @@
:insuranceCompanyName="insuranceCompanyName"
:showInsuranceCoverageAs="showInsuranceCoverageAs"
:isMSRFeeApplicable="isMSRFeeApplicable"
:IsMSRFeeCoveredByInsurance="isMSRFeeCoveredByInsurance"
:isItac="isItac"
:isNoComp="isNoComp"
:isCollapsible="false" />
@ -77,6 +78,7 @@ import { createAdyenCheckout } from "@/helpers/adyen-helper";
import { Dropin } from "@adyen/adyen-web/auto";
import { applicationConfig } from "@/constants/application-config";
import { paymentMethods } from "@/constants/payment-method-constants";
import analyticsMixin from "@/mixins/analytics-mixin";
import "@adyen/adyen-web/styles/adyen.css";
import { mapAdyenToFmgPaymentMethod, mapFmgToAdyenPaymentMethod } from "../../helpers/adyen-helper";
@ -133,6 +135,25 @@ export default {
},
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() {
// Stub, for navigating back via nav-bar.
this.$router.navigateWithoutSaving(
@ -203,6 +224,12 @@ export default {
},
onError: (error, component) => {
console.log(`Error from Adyen`);
const errorJson = JSON.stringify(
error,
Object.getOwnPropertyNames(Object(error))
);
analyticsMixin.methods.pushFmgSessionData(errorJson);
this.handleError(error);
},
},
@ -371,7 +398,12 @@ export default {
await global.$logger.logError(stringToLog);
this.hasPaymentFailureError = true;
this.$router.navigateWithoutSaving(
this.navigationScenarios.PIA_ERROR,
this.pageName
);
return;
}
this.dropinComponent?.update();
@ -560,13 +592,16 @@ export default {
isMSRFeeApplicable() {
return this.$store.getters.order.isMSRFeeApplicable;
},
isMSRFeeCoveredByInsurance() {
return this.$store.getters.order.isMSRFeeCoveredByInsurance;
},
lineItems() {
return deepClone(this.$store.getters.lineItems);
},
},
mounted() {
this.initializeAdyen();
this.initializeAdyenWithErrorHandling();
},
components: {

View file

@ -47,6 +47,7 @@ import { Form } from "vee-validate";
import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
import { storeActions } from "@/constants/store-actions";
import baseMixin from "@/mixins/base-mixin";
export default {
name: "return-user",
@ -74,6 +75,13 @@ export default {
startOverImage: null,
};
},
mounted() {
// The global baseMixin.mounted() skips hiding the loading modal when
// external-parameter state is active, but those parameters have no
// consumer on this interstitial. Clear that state and ensure the loader
// is hidden so the user can never get stuck behind it on this page.
baseMixin.methods.ResetExternalParamsAndHideModal();
},
methods: {
arePagePrerequisitesValid() {
return getFunnelCookie() !== null;

View file

@ -706,10 +706,16 @@ export default {
isMobileStaticRecalibrationApplicable() {
return (
this.displayMSR &&
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
this.isMSRFeePartNumber &&
(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() {
return (
experimentMixin.methods

View file

@ -160,12 +160,16 @@ export default {
// and aws FireHose stream, DigitalConsumer-Session-Firehose, to push data to an
// S3 bucket, safelite-dev-digitalconsumer-session-data-us-east-2/1.
// This bucket data is then picked up by snowflake for analytics use.
async pushFmgSessionData() {
async pushFmgSessionData(errorJson = null) {
var currentPageName = getPageNameFromRouter(true);
if (!currentPageName) {
return;
}
if (errorJson) {
currentPageName += ` ERROR: ${errorJson}`;
}
const hasSubmittedOrder = baseMixin.methods.hasSubmittedOrder();
const submittedOrder = baseMixin.methods.getSubmittedOrder();
const order = hasSubmittedOrder ? submittedOrder : store.getters.order;
@ -209,6 +213,7 @@ export default {
var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
var sessionData = {};
sessionData.currentPage = currentPageName;
sessionData.sid = getSessionIdValue();
sessionData.deviceId = getDeviceIdValue();
@ -931,6 +936,11 @@ function getPageNameFromRouter(useDefaultUrl = false) {
router.currentRoute.value &&
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;
}