Updates
This commit is contained in:
parent
accf724428
commit
f33810a43d
13 changed files with 64 additions and 14 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<script>
|
||||
window.dataLayer = [{}];
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@
|
|||
@import "@/styles/common-typography-styles.scss";
|
||||
@import "@/styles/common-error-styles.scss";
|
||||
@import "@/styles/common-animations.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import axios from "axios";
|
||||
//import analyticsMixIn from "@/mixins/analytics-mixin.js";
|
||||
import analyticsMixIn from "@/mixins/analytics-mixin.js";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
import { applicationConfig } from "@/constants/application-config.js";
|
||||
import { GaCategories, GaActions, GaLabels } from "@/constants/analytics";
|
||||
import { headerKeys } from "@/constants/header-keys";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
export default {
|
||||
callHttpClient({ method, endpoint, payload, logApiCall = true}) {
|
||||
|
|
@ -25,14 +25,12 @@ export default {
|
|||
})
|
||||
.then((response) => {
|
||||
if (logApiCall) {
|
||||
/*
|
||||
analyticsMixIn.methods.pushEventToGA(
|
||||
GaCategories.API_RESPONSE,
|
||||
GaActions.RESULT,
|
||||
`${GaLabels.SUCCESS}_${endpoint}`,
|
||||
true
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
return resolve(response);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,18 @@
|
|||
// Supporting files
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
export default {
|
||||
name: 'vehicle-make',
|
||||
setup()
|
||||
{
|
||||
const mainStore = useMainStore()
|
||||
|
||||
return {
|
||||
mainStore,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedMake: null,
|
||||
|
|
|
|||
|
|
@ -28,9 +28,18 @@
|
|||
// Supporting files
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
export default {
|
||||
name: "vehicle-model",
|
||||
setup()
|
||||
{
|
||||
const mainStore = useMainStore()
|
||||
|
||||
return {
|
||||
mainStore,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedModel: null,
|
||||
|
|
|
|||
|
|
@ -29,10 +29,19 @@ import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner";
|
|||
// Supporting files
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
|
||||
export default {
|
||||
name: "vehicle-style",
|
||||
setup()
|
||||
{
|
||||
const mainStore = useMainStore()
|
||||
|
||||
return {
|
||||
mainStore,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedStyle: null,
|
||||
|
|
|
|||
|
|
@ -28,9 +28,18 @@
|
|||
// Supporting files
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
export default {
|
||||
name: "vehicle-year",
|
||||
setup()
|
||||
{
|
||||
const mainStore = useMainStore()
|
||||
|
||||
return {
|
||||
mainStore,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedYear: null,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,14 @@
|
|||
|
||||
export default {
|
||||
name: "year-question",
|
||||
setup()
|
||||
{
|
||||
const mainStore = useMainStore()
|
||||
|
||||
return {
|
||||
mainStore,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
years: Array,
|
||||
|
|
|
|||
|
|
@ -18,13 +18,14 @@ const vueApp = createApp(App);
|
|||
const pinia = createPinia();
|
||||
vueApp.use(pinia);
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
useMainStore().populateInitialState();
|
||||
useMainStore().populateInitialState()
|
||||
|
||||
|
||||
// Additional Vue items to setup
|
||||
vueApp.use(router);
|
||||
vueApp.use(Maska);
|
||||
vueApp.mixin(baseMixin);
|
||||
vueApp.mixin(analyticsMixin);
|
||||
vueApp.mixin(experimentMixin);
|
||||
vueApp.use(Maska);
|
||||
|
||||
vueApp.mount("#app");
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ import {
|
|||
} from "@/constants/analytics";
|
||||
import { cookieNames } from "@/constants/cookie-names";
|
||||
import { useMainStore } from "@/store";
|
||||
import { mapStores } from "pinia";
|
||||
|
||||
import baseMixin from "@/mixins/base-mixin";
|
||||
import { mapStores } from "pinia";
|
||||
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
|
|
@ -73,6 +74,8 @@ export default {
|
|||
|
||||
pushToDataLayerIfDefined(eventToBePushed);
|
||||
|
||||
console.log("GA REPLY -" + eventToBePushed);
|
||||
|
||||
if (pushToLogApp) {
|
||||
this.logCustomEvent(category, action, labelToLog, undefined);
|
||||
}
|
||||
|
|
@ -171,7 +174,7 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useMainStore),
|
||||
//...mapStores(useMainStore),
|
||||
|
||||
analyticsPageEvents() {
|
||||
return analyticsPageEvents;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { useMainStore } from "@/store";
|
||||
|
||||
import { mapActions, mapStores } from "pinia";
|
||||
import { useMainStore } from "@/store";
|
||||
|
||||
import { storeActions } from "@/constants/store-actions.js";
|
||||
import { storeMutations } from "@/constants/store-mutations.js";
|
||||
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
|
||||
|
|
@ -36,12 +38,12 @@ export default {
|
|||
},
|
||||
savePageDataToStore(page, data) {
|
||||
// TODO: Fix this!
|
||||
//this.mainStore.commit(storeMutations.UPDATE_PAGE_DATA, { page: page, data: data });
|
||||
//this.useMainStore.commit(storeMutations.UPDATE_PAGE_DATA, { page: page, data: data });
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// store will be accessible globally as its id + 'Store'
|
||||
...mapStores(useMainStore),
|
||||
// store will be accessible globally as its id + 'Store'
|
||||
//...mapStores(useMainStore),
|
||||
|
||||
storeActions() {
|
||||
return storeActions;
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ function navigateToUrl(url, optionalQuery = {}) {
|
|||
function getNavigationMap (scenario, currentRoute) {
|
||||
const issPageValue = currentRoute.query.issPage;
|
||||
try {
|
||||
|
||||
const matchedQueryValue = routingTable(useMainStore())
|
||||
.filter(
|
||||
(item) =>
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ export const useMainStore = defineStore({
|
|||
shouldUseSessionId: shouldUseSessionId,
|
||||
experimentsForUser: experimentsForUser,
|
||||
}
|
||||
|
||||
return globalMethods.callHttpClient({
|
||||
method: endpoints.LogPageView.method,
|
||||
endpoint: endpoints.LogPageView.url,
|
||||
|
|
|
|||
Loading…
Reference in a new issue