\ No newline at end of file
+ currentCarInfo: String,
+ neededCarInfo: String,
+ backFunction: Function,
+ },
+};
+
diff --git a/src/commonComponents/carAttributes/carAttributes.spec.js b/src/commonComponents/carAttributes/carAttributes.spec.js
index e69de29bb..882a68129 100644
--- a/src/commonComponents/carAttributes/carAttributes.spec.js
+++ b/src/commonComponents/carAttributes/carAttributes.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/commonComponents/carAttributes/carAttributes.vue b/src/commonComponents/carAttributes/carAttributes.vue
index eb5d6e9b5..4bdc644cd 100644
--- a/src/commonComponents/carAttributes/carAttributes.vue
+++ b/src/commonComponents/carAttributes/carAttributes.vue
@@ -1,28 +1,28 @@
-
+
\ No newline at end of file
+ buttonPrimary,
+ },
+};
+
diff --git a/src/layouts/home/home.spec.js b/src/layouts/home/home.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/home/home.spec.js
+++ b/src/layouts/home/home.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/home/home.vue b/src/layouts/home/home.vue
index 5a474c738..31a89d7e2 100644
--- a/src/layouts/home/home.vue
+++ b/src/layouts/home/home.vue
@@ -1,6 +1,6 @@
-
-
Home
- SelectCar
-
-
\ No newline at end of file
+
+
Home
+ SelectCar
+
+
diff --git a/src/layouts/notFound/notFound.spec.js b/src/layouts/notFound/notFound.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/notFound/notFound.spec.js
+++ b/src/layouts/notFound/notFound.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/notFound/notFound.vue b/src/layouts/notFound/notFound.vue
index 92f2ec8fc..67c05787e 100644
--- a/src/layouts/notFound/notFound.vue
+++ b/src/layouts/notFound/notFound.vue
@@ -1,6 +1,5 @@
-
-
Not found
-
-
-
\ No newline at end of file
+
+
Not found
+
+
diff --git a/src/layouts/selectDamage/selectDamage.spec.js b/src/layouts/selectDamage/selectDamage.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/selectDamage/selectDamage.spec.js
+++ b/src/layouts/selectDamage/selectDamage.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/selectDamage/selectDamage.vue b/src/layouts/selectDamage/selectDamage.vue
index ccfe661a8..0d78a2ead 100644
--- a/src/layouts/selectDamage/selectDamage.vue
+++ b/src/layouts/selectDamage/selectDamage.vue
@@ -1,75 +1,77 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- How bad is it?
-
-
-
-
-
-
-
-
-
-
-
-
-
- Change Vehicle
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ How bad is it?
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Change Vehicle
+
+
+
+
-
+
diff --git a/src/layouts/selectMake/selectMake.spec.js b/src/layouts/selectMake/selectMake.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/selectMake/selectMake.spec.js
+++ b/src/layouts/selectMake/selectMake.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/selectMake/selectMake.vue b/src/layouts/selectMake/selectMake.vue
index 9eeef5217..9308c8e06 100644
--- a/src/layouts/selectMake/selectMake.vue
+++ b/src/layouts/selectMake/selectMake.vue
@@ -1,40 +1,37 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+ baseTemplate,
+ carAttributes,
+ },
+};
+
diff --git a/src/layouts/selectModel/selectModel.spec.js b/src/layouts/selectModel/selectModel.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/selectModel/selectModel.spec.js
+++ b/src/layouts/selectModel/selectModel.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/selectModel/selectModel.vue b/src/layouts/selectModel/selectModel.vue
index 09292c78b..f2becd40a 100644
--- a/src/layouts/selectModel/selectModel.vue
+++ b/src/layouts/selectModel/selectModel.vue
@@ -1,40 +1,37 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+ baseTemplate,
+ carAttributes,
+ },
+};
+
diff --git a/src/layouts/selectStyle/selectStyle.spec.js b/src/layouts/selectStyle/selectStyle.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/selectStyle/selectStyle.spec.js
+++ b/src/layouts/selectStyle/selectStyle.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/selectStyle/selectStyle.vue b/src/layouts/selectStyle/selectStyle.vue
index 58f0657a1..e9dd0d143 100644
--- a/src/layouts/selectStyle/selectStyle.vue
+++ b/src/layouts/selectStyle/selectStyle.vue
@@ -1,40 +1,39 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+ baseTemplate,
+ carAttributes,
+ },
+};
+
diff --git a/src/layouts/selectYear/selectYear.spec.js b/src/layouts/selectYear/selectYear.spec.js
index e69de29bb..882a68129 100644
--- a/src/layouts/selectYear/selectYear.spec.js
+++ b/src/layouts/selectYear/selectYear.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/layouts/selectYear/selectYear.vue b/src/layouts/selectYear/selectYear.vue
index 501c29ea7..4f0a2a018 100644
--- a/src/layouts/selectYear/selectYear.vue
+++ b/src/layouts/selectYear/selectYear.vue
@@ -1,42 +1,39 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
+ baseTemplate,
+ carAttributes,
+ },
+};
+
diff --git a/src/main.js b/src/main.js
index 0ab4dc394..3f2fd7a7e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,7 @@
import { createApp } from "vue";
import App from "./App.vue";
-import router from './router';
-import store from '@/store';
+import router from "./router";
+import store from "@/store";
//Bootstrap JavaScript
import "../node_modules/bootstrap/dist/js/bootstrap.js";
diff --git a/src/router/dynamic-routing/component-loader.js b/src/router/dynamic-routing/component-loader.js
index 8c29205c5..b9b06c3a9 100644
--- a/src/router/dynamic-routing/component-loader.js
+++ b/src/router/dynamic-routing/component-loader.js
@@ -1,3 +1,3 @@
export function lazyLoadComponent(componentName) {
- return () => import(`@/layouts/${componentName}.vue`)
-}
\ No newline at end of file
+ return () => import(`@/layouts/${componentName}.vue`);
+}
diff --git a/src/router/dynamic-routing/route-compile.js b/src/router/dynamic-routing/route-compile.js
index 60f40ea4c..94bff4baa 100644
--- a/src/router/dynamic-routing/route-compile.js
+++ b/src/router/dynamic-routing/route-compile.js
@@ -4,10 +4,9 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"
export function getRouteData(relativeUrl) {
return axios
.post("/api/v1/content/RouteInfo", {
- relativeUrl: relativeUrl
+ relativeUrl: relativeUrl,
})
.then((response) => {
-
// This is really only for Mockey. In a real case, this would just be a 404 and we would check status code.
if (response.data.Result === undefined) {
return Promise.reject("Could not find any details about given route.");
@@ -26,7 +25,6 @@ export function getRouteData(relativeUrl) {
});
});
-
return Promise.resolve(routeData);
});
}
diff --git a/src/router/index.js b/src/router/index.js
index 2f8795001..60d9d230f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -12,12 +12,12 @@ const routes = [
{
path: "/",
Name: "Home",
- component: Home
+ component: Home,
},
];
const router = createRouter({
- history: createWebHistory('/fmg/'),
+ history: createWebHistory("/fmg/"),
routes,
});
@@ -26,13 +26,11 @@ router.beforeEach(async (to, from, next) => {
});
async function GoToDynamicRoute(to, next) {
-
let doesRouteResolve = router.resolve(to.path).matched.length > 0;
console.log("Does route resolve?" + " " + (doesRouteResolve ? "Yes" : "No"));
if (!doesRouteResolve) {
-
let routeData = await getRouteData(to.path).catch((exp) => {
console.log(exp);
next({ name: "NotFound" }); // Go to 404.
diff --git a/src/store/index.js b/src/store/index.js
index c956742bd..f16f12b3f 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,72 +1,86 @@
-import { createStore } from 'vuex';
-import createPersistedState from 'vuex-persistedstate';
-import axios from 'axios';
-import router from '@/router';
+import { createStore } from "vuex";
+import createPersistedState from "vuex-persistedstate";
+import axios from "axios";
+import router from "@/router";
export default createStore({
- plugins: [createPersistedState({
- storage: window.sessionStorage,
- })],
- state: {
- makes: [],
- models: [],
- styles: [],
- year: '',
- make: '',
- model: '',
- style: '',
- slideTransition: 'none',
- carImg: "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg",
- blurImg: true
+ plugins: [
+ createPersistedState({
+ storage: window.sessionStorage,
+ }),
+ ],
+ state: {
+ makes: [],
+ models: [],
+ styles: [],
+ year: "",
+ make: "",
+ model: "",
+ style: "",
+ slideTransition: "none",
+ carImg:
+ "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg",
+ blurImg: true,
+ },
+ mutations: {
+ updateYear(state, data) {
+ state.year = data.year;
+ state.makes = data.makes.data.Result;
+ state.slideTransition = "slide";
},
- mutations: {
- updateYear(state, data){
- state.year = data.year;
- state.makes = data.makes.data.Result;
- state.slideTransition = 'slide'
- },
- updateMake(state, data){
- state.make = data.make;
- state.models = data.models.data.Result;
- state.slideTransition = 'slide';
- },
- updateModel(state, data){
- state.model = data.model;
- state.styles = data.styles.data.Result;
- state.slideTransition = 'slide';
- },
- updateStyle(state, data){
- state.style = data.style;
- state.carImg = "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg";
- state.blurImg = false;
- state.slideTransition = 'slide';
- },
- removeStyle(state) {
- state.style = '';
- state.blurImg = true;
- state.carImg = 'https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg'
- }
+ updateMake(state, data) {
+ state.make = data.make;
+ state.models = data.models.data.Result;
+ state.slideTransition = "slide";
},
- actions: {
- async selectYear(context, year){
- const makes = await axios.get(`https://mockey.qa.sagaws.net/service/makes/year=${year}`);
- context.commit('updateYear', {year, makes});
- router.push(`/select-make?year=${year}`);
- },
- async selectMake({commit, state}, make){
- const models = await axios.get(`https://mockey.qa.sagaws.net/service/models/year=${state.year}/make=${make}`);
- commit('updateMake', {make, models});
- router.push(`/select-model?year=${state.year}&make=${make}`);
- },
- async selectModel({commit, state}, model){
- const styles = await axios.get(`https://mockey.qa.sagaws.net/service/styles/year=${state.year}/make=${state.make}/model=${model}`);
- commit('updateModel', {model, styles});
- router.push(`/select-style?year=${state.year}&make=${state.make}&model=${model}`);
- },
- selectStyle({commit, state}, style){
- commit('updateStyle', {style});
- router.push(`/damage?year=${state.year}&make=${state.make}&model=${state.model}&style=${style}`);
- }
- }
-
-})
+ updateModel(state, data) {
+ state.model = data.model;
+ state.styles = data.styles.data.Result;
+ state.slideTransition = "slide";
+ },
+ updateStyle(state, data) {
+ state.style = data.style;
+ state.carImg =
+ "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg";
+ state.blurImg = false;
+ state.slideTransition = "slide";
+ },
+ removeStyle(state) {
+ state.style = "";
+ state.blurImg = true;
+ state.carImg =
+ "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg";
+ },
+ },
+ actions: {
+ async selectYear(context, year) {
+ const makes = await axios.get(
+ `https://mockey.qa.sagaws.net/service/makes/year=${year}`
+ );
+ context.commit("updateYear", { year, makes });
+ router.push(`/select-make?year=${year}`);
+ },
+ async selectMake({ commit, state }, make) {
+ const models = await axios.get(
+ `https://mockey.qa.sagaws.net/service/models/year=${state.year}/make=${make}`
+ );
+ commit("updateMake", { make, models });
+ router.push(`/select-model?year=${state.year}&make=${make}`);
+ },
+ async selectModel({ commit, state }, model) {
+ const styles = await axios.get(
+ `https://mockey.qa.sagaws.net/service/styles/year=${state.year}/make=${state.make}/model=${model}`
+ );
+ commit("updateModel", { model, styles });
+ router.push(
+ `/select-style?year=${state.year}&make=${state.make}&model=${model}`
+ );
+ },
+ selectStyle({ commit, state }, style) {
+ commit("updateStyle", { style });
+ router.push(
+ `/damage?year=${state.year}&make=${state.make}&model=${state.model}&style=${style}`
+ );
+ },
+ },
+});
diff --git a/src/uxComponents/buttonPrimary/buttonPrimary.spec.js b/src/uxComponents/buttonPrimary/buttonPrimary.spec.js
index e69de29bb..882a68129 100644
--- a/src/uxComponents/buttonPrimary/buttonPrimary.spec.js
+++ b/src/uxComponents/buttonPrimary/buttonPrimary.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/uxComponents/buttonPrimary/buttonPrimary.vue b/src/uxComponents/buttonPrimary/buttonPrimary.vue
index abc24e291..c9134a2db 100644
--- a/src/uxComponents/buttonPrimary/buttonPrimary.vue
+++ b/src/uxComponents/buttonPrimary/buttonPrimary.vue
@@ -3,28 +3,31 @@
type="button"
class="btn d-flex align-items-center"
v-on:click="showLoader()"
- v-bind:class="[(this.isLoading ? 'button-loader' : 'not-loading'),this.buttonType]"
- >
+ v-bind:class="[
+ this.isLoading ? 'button-loader' : 'not-loading',
+ this.buttonType,
+ ]"
+ >
{{ this.buttonText }}
diff --git a/src/uxComponents/confetti/confetti.spec.js b/src/uxComponents/confetti/confetti.spec.js
index e69de29bb..882a68129 100644
--- a/src/uxComponents/confetti/confetti.spec.js
+++ b/src/uxComponents/confetti/confetti.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/uxComponents/confetti/confetti.vue b/src/uxComponents/confetti/confetti.vue
index 71592350a..38fc69d10 100644
--- a/src/uxComponents/confetti/confetti.vue
+++ b/src/uxComponents/confetti/confetti.vue
@@ -1,15 +1,18 @@
diff --git a/src/uxComponents/radioCard/radioCard.spec.js b/src/uxComponents/radioCard/radioCard.spec.js
index e69de29bb..882a68129 100644
--- a/src/uxComponents/radioCard/radioCard.spec.js
+++ b/src/uxComponents/radioCard/radioCard.spec.js
@@ -0,0 +1 @@
+test.todo('some test to be written in the future');
\ No newline at end of file
diff --git a/src/uxComponents/radioCard/radioCard.vue b/src/uxComponents/radioCard/radioCard.vue
index ac6f6875d..d1ea27a7a 100644
--- a/src/uxComponents/radioCard/radioCard.vue
+++ b/src/uxComponents/radioCard/radioCard.vue
@@ -1,9 +1,25 @@