CSR-514 Uncomment and fix parts of experimentOrder

This commit is contained in:
Katie 2022-08-09 12:36:10 -04:00
parent 4de7240610
commit cdfcec5257
3 changed files with 17 additions and 15 deletions

View file

@ -15,8 +15,9 @@ export default {
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings) [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings)
} }
if (endpoint.includes("/vehicle/")) if (endpoint.includes("/experiments/")) {
cfDistroUrl = "https://localhost:44331" cfDistroUrl = "https://localhost:44372";
}
axios({ method: method, url: cfDistroUrl + endpoint, data: payloadAndAnalyticsData, crossDomain: true, responseType: {}, headers: headers }) axios({ method: method, url: cfDistroUrl + endpoint, data: payloadAndAnalyticsData, crossDomain: true, responseType: {}, headers: headers })
.then((response) => { .then((response) => {

View file

@ -37,13 +37,14 @@ const routes = [
return next(false); return next(false);
} }
if (!store.getters.applicationUser.triggeredSiteEntry) { // TODO CSR-514 UNCOMMENT CONDITION
await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, { // if (!store.getters.applicationUser.triggeredSiteEntry) {
baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
userId: getDeviceIdValue(), userId: getDeviceIdValue(),
triggerEvent: experimentTriggers.SITE_ENTRY, triggerEvent: experimentTriggers.SITE_ENTRY,
triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE
}); })
} // }
// If the saved session has timed out, clear the session, execute 404 logic. // If the saved session has timed out, clear the session, execute 404 logic.
if (getFunnelCookie() !== null && !isSavedSessionStillActive()) { if (getFunnelCookie() !== null && !isSavedSessionStillActive()) {

View file

@ -362,14 +362,14 @@ export const getters = {
serviceZipCode: state.order.serviceLocation.zipCode, serviceZipCode: state.order.serviceLocation.zipCode,
parentAccountNumber: state.order.accountNumber, parentAccountNumber: state.order.accountNumber,
isCoverageVerified: state.order.payment.insuranceCoverage.isVerified, isCoverageVerified: state.order.payment.insuranceCoverage.isVerified,
// orderPartNumbers: [...Object.values(state.order.lineItems.glassParts ?? {}), ...Object.values(state.order.lineItems.otherParts ?? {})], 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 ?? {})], 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, hasRecalibrationPart: Object.values(state.order.lineItems.glassParts ?? []).filter(x => x.requiresRecalibration)?.length > 0,
// selectedMultiGlass: state.order.damage.glassToReplace.length > 1, selectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
// selectedWindshieldGlass: Object.keys(state.order.damage.glassToReplace ?? []).map(x => x.split("-")[0]).includes(damageLocationsSelected.WINDSHIELD), selectedWindshieldGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.WINDSHIELD),
// selectedBackGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.BACK), selectedBackGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.REAR),
// selectedDriverSideGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.DRIVER), selectedDriverSideGlass: (state.order.damage.glassToReplace ?? []).map(x => x.glassLocation).includes(damageLocationsSelected.DRIVER),
// selectedPassengerSideGlass: Object.keys(state.order.damage.glassToReplace).map(x => x.split("-")[0]).includes(damageLocationsSelected.PASSENGER) 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), {}) 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 }) { runExperimentsForTrigger(context, { userId, triggerEvent, triggerValue }) {
if (triggerValue == experimentTriggers.SITE_ENTRY) { if (triggerEvent == experimentTriggers.SITE_ENTRY) {
context.commit(storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, true); context.commit(storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, true);
} }