CSR-514 Uncomment and fix parts of experimentOrder
This commit is contained in:
parent
4de7240610
commit
cdfcec5257
3 changed files with 17 additions and 15 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue