Fixed a couple of issues that were causing failures.
This commit is contained in:
parent
080b9b4b1c
commit
e757496dda
3 changed files with 64 additions and 67 deletions
|
|
@ -1,55 +1,55 @@
|
||||||
const endpoints = {
|
const endpoints = {
|
||||||
GetRouteInfo: {
|
GetRouteInfo: {
|
||||||
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/RouteInfo`,
|
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/RouteInfo`,
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetHomepageInfo: {
|
GetHomepageInfo: {
|
||||||
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`,
|
url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`,
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetPageData: {
|
GetPageData: {
|
||||||
url: (applicationAbbreviation, pageName) => `/content/api/v1/content/${applicationAbbreviation}/${pageName}`,
|
url: (applicationAbbreviation, pageName) => `/content/api/v1/content/${applicationAbbreviation}/${pageName}`,
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetVehicleYears: {
|
GetVehicleYears: {
|
||||||
url: "/vehicle/api/v1/vehicle/years",
|
url: '/vehicle/api/v1/vehicle/years',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetVehicleMakes: {
|
GetVehicleMakes: {
|
||||||
url: "/vehicle/api/v1/vehicle/makes/",
|
url: '/vehicle/api/v1/vehicle/makes/',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetVehicleModels: {
|
GetVehicleModels: {
|
||||||
url: "/vehicle/api/v1/vehicle/models",
|
url: '/vehicle/api/v1/vehicle/models',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetVehicleStyles: {
|
GetVehicleStyles: {
|
||||||
url: "/vehicle/api/v1/vehicle/styles",
|
url: '/vehicle/api/v1/vehicle/styles',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetDamageOptions: {
|
GetDamageOptions: {
|
||||||
url: "/parts/api/v1/parts/damage-options",
|
url: '/parts/api/v1/parts/damage-options',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetPartsOrQuestions: {
|
GetPartsOrQuestions: {
|
||||||
url: "/parts/api/v1/parts/parts-or-questions",
|
url: '/parts/api/v1/parts/parts-or-questions',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetParts: {
|
GetParts: {
|
||||||
url: "/parts/api/v1/parts/parts",
|
url: '/parts/api/v1/parts/parts',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetPriceOrderItems: {
|
GetPriceOrderItems: {
|
||||||
url: '/price/api/v1/price/order-items',
|
url: '/price/api/v1/price/order-items',
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetCapabilityQuestions: {
|
GetCapabilityQuestions: {
|
||||||
url: "/parts/api/v1/parts/capability-questions",
|
url: '/parts/api/v1/parts/capability-questions',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GetPartFromCapabilityAnswer: {
|
GetPartFromCapabilityAnswer: {
|
||||||
url: "/parts/api/v1/parts/part-from-capability-answer",
|
url: '/parts/api/v1/parts/part-from-capability-answer',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetWipers: {
|
GetWipers: {
|
||||||
url: '/parts/api/v1/parts/wipers',
|
url: '/parts/api/v1/parts/wipers',
|
||||||
|
|
@ -64,59 +64,59 @@ const endpoints = {
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetVehicle: {
|
GetVehicle: {
|
||||||
url: "/vehicle/api/v1/vehicle/lookup",
|
url: '/vehicle/api/v1/vehicle/lookup',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
LogExperimentExposureIfAssigned: {
|
LogExperimentExposureIfAssigned: {
|
||||||
url: "/experiments/api/v1/experiments/log-exposure",
|
url: '/experiments/api/v1/experiments/log-exposure',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
LogPageView: {
|
LogPageView: {
|
||||||
url: "/analytics/api/v1/analytics/log-page-view",
|
url: '/analytics/api/v1/analytics/log-page-view',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
LogCustomEvent: {
|
LogCustomEvent: {
|
||||||
url: "/analytics/api/v1/analytics/log-custom-event",
|
url: '/analytics/api/v1/analytics/log-custom-event',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
LookupVehicleByVin: {
|
LookupVehicleByVin: {
|
||||||
url: "/vehicle/api/v1/vehicle/lookup",
|
url: '/vehicle/api/v1/vehicle/lookup',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
LookupVinByAddress: {
|
LookupVinByAddress: {
|
||||||
url: "/vehicle/api/v1/vehicle/lookup-vin-by-address",
|
url: '/vehicle/api/v1/vehicle/lookup-vin-by-address',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
LookupVinByPlate: {
|
LookupVinByPlate: {
|
||||||
url: "/vehicle/api/v1/vehicle/lookup-vin-by-plate",
|
url: '/vehicle/api/v1/vehicle/lookup-vin-by-plate',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
InitializeSession: {
|
InitializeSession: {
|
||||||
url: "/analytics/api/v1/analytics/initialize",
|
url: '/analytics/api/v1/analytics/initialize',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
GetExperimentsByUser: {
|
GetExperimentsByUser: {
|
||||||
url: "/analytics/api/v1/analytics/get-experiments",
|
url: '/analytics/api/v1/analytics/get-experiments',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
RunExperimentsForTrigger: {
|
RunExperimentsForTrigger: {
|
||||||
url: "/experiments/api/v1/experiments/run",
|
url: '/experiments/api/v1/experiments/run',
|
||||||
method: "POST",
|
method: 'POST'
|
||||||
},
|
},
|
||||||
ValidateZip: {
|
ValidateZip: {
|
||||||
url: "/location/api/v1/location/zip",
|
url: '/location/api/v1/location/zip',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
GooglePlaces: {
|
GooglePlaces: {
|
||||||
url: "https://maps.googleapis.com/maps/api/js?key={apiKey}&libraries=places"
|
url: 'https://maps.googleapis.com/maps/api/js?key={apiKey}&libraries=places'
|
||||||
},
|
},
|
||||||
ValidateClientTag: {
|
ValidateClientTag: {
|
||||||
url: "/clientauth/api/v1/clientauth/validate-client-tag",
|
url: '/clientauth/api/v1/clientauth/validate-client-tag',
|
||||||
method: "GET",
|
method: 'GET'
|
||||||
},
|
},
|
||||||
IsVinbyAddressPermissible:{
|
IsVinbyAddressPermissible:{
|
||||||
url:"/vehicle/api/v1/vehicle/is-vin-by-address-permissible",
|
url:'/vehicle/api/v1/vehicle/is-vin-by-address-permissible',
|
||||||
method:"Get",
|
method:'Get'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { dynamicStrings } from '@/constants/dynamic-strings';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
export function fetchCmsContentForPage(issPage) {
|
export function fetchCmsContentForPage(issPage) {
|
||||||
const store = useMainStore()
|
const store = useMainStore();
|
||||||
const clientName = store.issConfig.clientName;
|
const clientName = store.issConfig.clientName;
|
||||||
const accountNumber = store.issConfig.accountNumber;
|
const accountNumber = store.issConfig.accountNumber;
|
||||||
const clientOverride = (clientName.length > 0 && accountNumber > 0);
|
const clientOverride = (clientName.length > 0 && accountNumber > 0);
|
||||||
|
|
@ -59,7 +59,7 @@ function processPageData(baseResponse, clientResponse) {
|
||||||
let found = false;
|
let found = false;
|
||||||
clientResponse.data.Result.forEach((clientWidget) => {
|
clientResponse.data.Result.forEach((clientWidget) => {
|
||||||
|
|
||||||
if ( clientWidget.Name == baseWidget.Name )
|
if ( clientWidget.Name === baseWidget.Name )
|
||||||
{
|
{
|
||||||
widgets.push(clientWidget);
|
widgets.push(clientWidget);
|
||||||
found = true;
|
found = true;
|
||||||
|
|
@ -78,7 +78,7 @@ function processPageData(baseResponse, clientResponse) {
|
||||||
let found = false;
|
let found = false;
|
||||||
widgets.forEach((currentWidget) => {
|
widgets.forEach((currentWidget) => {
|
||||||
|
|
||||||
if ( clientWidget.Name == currentWidget.Name )
|
if ( clientWidget.Name === currentWidget.Name )
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
@ -178,10 +178,10 @@ function processWidgetItemForReplacement(widgetModel, key) {
|
||||||
|
|
||||||
function mapStringToModal(str) {
|
function mapStringToModal(str) {
|
||||||
const startIndex = str.indexOf('{' + dynamicStrings.MODAL_LINK);
|
const startIndex = str.indexOf('{' + dynamicStrings.MODAL_LINK);
|
||||||
const linkToReplace = str.substring(startIndex, str.length);
|
let linkToReplace = str.substring(startIndex, str.length);
|
||||||
linkToReplace = linkToReplace.substring(0, linkToReplace.indexOf('}') + 1);
|
linkToReplace = linkToReplace.substring(0, linkToReplace.indexOf('}') + 1);
|
||||||
|
|
||||||
const params = linkToReplace.substring((dynamicStrings.MODAL_LINK).length + 2, linkToReplace.length -1)
|
const params = linkToReplace.substring((dynamicStrings.MODAL_LINK).length + 2, linkToReplace.length - 1);
|
||||||
const splitParams = params.split(',');
|
const splitParams = params.split(',');
|
||||||
|
|
||||||
const bodyText = '<a modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window">' + splitParams[1] + '</a>';
|
const bodyText = '<a modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window">' + splitParams[1] + '</a>';
|
||||||
|
|
@ -189,9 +189,9 @@ function mapStringToModal(str) {
|
||||||
let returnVal = str.replace(linkToReplace, bodyText);
|
let returnVal = str.replace(linkToReplace, bodyText);
|
||||||
|
|
||||||
if (returnVal.includes(dynamicStrings.MODAL_LINK)) {
|
if (returnVal.includes(dynamicStrings.MODAL_LINK)) {
|
||||||
returnVal = mapStringToModal(returnVal)
|
returnVal = mapStringToModal(returnVal);
|
||||||
}
|
}
|
||||||
return returnVal
|
return returnVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to convert a string, into a matching global state item.
|
// Function to convert a string, into a matching global state item.
|
||||||
|
|
@ -232,7 +232,7 @@ function getStoreValueFromString(str) {
|
||||||
|
|
||||||
let storeOrStateObject = useMainStore();
|
let storeOrStateObject = useMainStore();
|
||||||
for (const s of str.split('.')) {
|
for (const s of str.split('.')) {
|
||||||
if (s === 'getters') continue; //For backward compatability
|
if (s === 'getters') continue; //For backward compatibility
|
||||||
if (storeOrStateObject[s] != undefined) {
|
if (storeOrStateObject[s] != undefined) {
|
||||||
storeOrStateObject = storeOrStateObject[s];
|
storeOrStateObject = storeOrStateObject[s];
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -259,10 +259,7 @@ export function processIfStatements(str, ifConditionKeyword, replacePlaceholderC
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasEmbeddedCrLf = /\r?\n|\r/g.test(str);
|
const hasEmbeddedCrLf = /\r?\n|\r/g.test(str);
|
||||||
if (hasEmbeddedCrLf) {
|
if (!containsRelevantIfStatement) {
|
||||||
console.warning('Processing of conditional string was skipped. String has embedded carriage return/linefeed.');
|
|
||||||
}
|
|
||||||
if (!containsRelevantIfStatement || hasEmbeddedCrLf) {
|
|
||||||
return str;
|
return str;
|
||||||
} else {
|
} else {
|
||||||
const ifStatementRegexExpression = getIfStatementRegexExpression();
|
const ifStatementRegexExpression = getIfStatementRegexExpression();
|
||||||
|
|
@ -422,7 +419,7 @@ export function doesCopyContainTextLink(copy) {
|
||||||
|
|
||||||
export function setupModalLinks(context) {
|
export function setupModalLinks(context) {
|
||||||
context.$nextTick(() => {
|
context.$nextTick(() => {
|
||||||
const elements = document.getElementsByClassName("modal-text")
|
const elements = document.getElementsByClassName("modal-text");
|
||||||
for(let element of elements){
|
for(let element of elements){
|
||||||
const target = element.getAttribute("modalTarget");
|
const target = element.getAttribute("modalTarget");
|
||||||
if(target)
|
if(target)
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ module.exports = {
|
||||||
@import "./node_modules/bootstrap/scss/variables";
|
@import "./node_modules/bootstrap/scss/variables";
|
||||||
@import "./node_modules/bootstrap/scss/mixins";
|
@import "./node_modules/bootstrap/scss/mixins";
|
||||||
@import "@/styles/mixins/customMixins";
|
@import "@/styles/mixins/customMixins";
|
||||||
`,
|
`
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
devtool: 'source-map',
|
devtool: 'source-map'
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue