CSR-690 Cleanup
This commit is contained in:
parent
11016372a3
commit
00d62b483f
7 changed files with 5 additions and 31 deletions
|
|
@ -9,12 +9,7 @@ import { headerKeys } from "@/constants/header-keys";
|
||||||
export default {
|
export default {
|
||||||
callHttpClient({ method, endpoint, payload, logApiCall = true }) {
|
callHttpClient({ method, endpoint, payload, logApiCall = true }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
||||||
|
|
||||||
let cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
|
||||||
if (endpoint.includes("/order/"))
|
|
||||||
cfDistroUrl = "https://localhost:44346"
|
|
||||||
|
|
||||||
const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" });
|
const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" });
|
||||||
const headers = {
|
const headers = {
|
||||||
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings)
|
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
|
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { lazy } from "yup";
|
|
||||||
|
|
||||||
// Mock Lazy Load
|
// Mock Lazy Load
|
||||||
jest.mock("@/router/dynamic-routing/component-loader.js", () => ({
|
jest.mock("@/router/dynamic-routing/component-loader.js", () => ({
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,3 @@ export function getDateForSavedSessionTimeout() {
|
||||||
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS)
|
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS)
|
||||||
return currentDate.toUTCString();
|
return currentDate.toUTCString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function to get saved session timeout date based on values in the cookie */
|
|
||||||
// function getSavedSessionTimeoutDate() {
|
|
||||||
// let lastTouched = new Date(getFunnelCookie()?.LastTouched);
|
|
||||||
// lastTouched = lastTouched ? lastTouched : new Date().toUTCString();
|
|
||||||
// let savedSessionTimeoutDate = lastTouched;
|
|
||||||
// savedSessionTimeoutDate.setDate(savedSessionTimeoutDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS);
|
|
||||||
|
|
||||||
// // const test = lastTouched
|
|
||||||
// // ? lastTouched.setDate(lastTouched.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS)
|
|
||||||
// // : getDateForSavedSessionTimeout();
|
|
||||||
|
|
||||||
// return savedSessionTimeoutDate;
|
|
||||||
// }
|
|
||||||
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return false; // TODO - DO TRUE TEST OF PAGEDATA
|
return true; // TODO - DO TRUE TEST OF PAGEDATA
|
||||||
// return Object.keys(store.getters.pageData(fmgPageValues.CAPABILITY_QUESTIONS)).length > 0;
|
// return Object.keys(store.getters.pageData(fmgPageValues.CAPABILITY_QUESTIONS)).length > 0;
|
||||||
},
|
},
|
||||||
showThisPartQuestionChain(part, i) {
|
showThisPartQuestionChain(part, i) {
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return false; // TODO - DO TRUE TEST OF PAGEDATA
|
return true; // TODO - DO TRUE TEST OF PAGEDATA
|
||||||
// return Object.keys(store.getters.pageData(fmgPageValues.MOLDING_QUESTIONS)).length > 0;
|
// return Object.keys(store.getters.pageData(fmgPageValues.MOLDING_QUESTIONS)).length > 0;
|
||||||
},
|
},
|
||||||
showThisPartQuestionChain(part, i) {
|
showThisPartQuestionChain(part, i) {
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,7 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
if (store.getters.vehicle.year){
|
return store.getters.vehicle.year != null;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,8 +207,6 @@ function navigateToUrl(url, optionalQuery = {}) {
|
||||||
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
|
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
|
||||||
}
|
}
|
||||||
|
|
||||||
externalUrl.searchParams.append("experiments", "ConceptFunnel=ConceptFunnel_V1=ConceptFunnel_TEST=true");
|
|
||||||
|
|
||||||
window.location.assign(externalUrl);
|
window.location.assign(externalUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue