diff --git a/src/global-methods.js b/src/global-methods.js index c419eba45..0da6824ef 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -15,8 +15,9 @@ export default { [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings) } - if (endpoint.includes("/vehicle/")) - cfDistroUrl = "https://localhost:44331" + if (endpoint.includes("/experiments/")) { + cfDistroUrl = "https://localhost:44372"; + } axios({ method: method, url: cfDistroUrl + endpoint, data: payloadAndAnalyticsData, crossDomain: true, responseType: {}, headers: headers }) .then((response) => { diff --git a/src/router/index.js b/src/router/index.js index d3688049f..2dcf104ea 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -37,13 +37,14 @@ const routes = [ return next(false); } - if (!store.getters.applicationUser.triggeredSiteEntry) { - await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { + // TODO CSR-514 UNCOMMENT CONDITION + // if (!store.getters.applicationUser.triggeredSiteEntry) { + baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { userId: getDeviceIdValue(), triggerEvent: experimentTriggers.SITE_ENTRY, triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE - }); - } + }) + // } // If the saved session has timed out, clear the session, execute 404 logic. if (getFunnelCookie() !== null && !isSavedSessionStillActive()) { diff --git a/src/store/index.js b/src/store/index.js index af4ab8de3..dbe18ef04 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -362,14 +362,14 @@ export const getters = { serviceZipCode: state.order.serviceLocation.zipCode, parentAccountNumber: state.order.accountNumber, isCoverageVerified: state.order.payment.insuranceCoverage.isVerified, - // orderPartNumbers: [...Object.values(state.order.lineItems.glassParts ?? {}), ...Object.values(state.order.lineItems.otherParts ?? {})], - // orderPartTypes: [...Object.keys(state.order.lineItems.glassParts ?? {}), ...Object.keys(state.order.lineItems.otherParts ?? {})], - // hasRecalibrationPart: Object.values(state.order.lineItems.glassParts ?? {}).filter(x => x.requiresRecalibration)?.length > 0, - // selectedMultiGlass: state.order.damage.glassToReplace.length > 1, - // selectedWindshieldGlass: Object.keys(state.order.damage.glassToReplace ?? []).map(x => x.split("-")[0]).includes(damageLocationsSelected.WINDSHIELD), - // selectedBackGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.BACK), - // selectedDriverSideGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.DRIVER), - // selectedPassengerSideGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.PASSENGER) + orderPartNumbers: [...Object.values(state.order.lineItems.glassParts ?? []), ...Object.values(state.order.lineItems.otherParts ?? [])], + orderPartTypes: [...Object.keys(state.order.lineItems.glassParts ?? []), ...Object.keys(state.order.lineItems.otherParts ?? [])], + hasRecalibrationPart: Object.values(state.order.lineItems.glassParts ?? []).filter(x => x.requiresRecalibration)?.length > 0, + selectedMultiGlass: state.order.damage.glassToReplace?.length > 1, + selectedWindshieldGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.WINDSHIELD), + selectedBackGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.REAR), + selectedDriverSideGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.DRIVER), + selectedPassengerSideGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.PASSENGER) } }, experimentSettings: (state) => state.applicationUser.experiments.map(x => x.settings).reduce((r, c) => Object.assign(r, c), {}) @@ -623,7 +623,7 @@ export const actions = { }, runExperimentsForTrigger(context, { userId, triggerEvent, triggerValue }) { - if (triggerValue == experimentTriggers.SITE_ENTRY) { + if (triggerEvent == experimentTriggers.SITE_ENTRY) { context.commit(storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, true); }