-
-
-
-
-
-
+
+
+
+
+
+
{
- vm.years = resultMap.yearQuestionInitialData;
+ next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
- vm.$refs.yearQuestion.initializeComponent(
- resultMap.yearQuestionInitialData
- );
- vm.$refs.makeQuestion.initializeComponent(
- resultMap.makeQuestionInitialData
- );
-
- vm.$refs.modelQuestion.initializeComponent(
- resultMap.modelQuestionInitialData
- );
- vm.$refs.styleQuestion.initializeComponent(
- resultMap.styleQuestionInitialData
- );
});
},
watch: {
selectedYear(yearIndex) {
- const parsedYearIndex = parseInt(yearIndex);
- this.mainStore.updateVehicleYear( this.years[parsedYearIndex] );
-
- this.$refs["makeQuestion"].getNewValues();
-
+ const parsedYearIndex = parseInt(yearIndex);
+ this.mainStore.updateVehicleYear(this.Years.values[parsedYearIndex]);
+ this.Makes.getNewValues();
},
- selectedMake(make) {
- this.mainStore.updateVehicleMake( make );
- this.$refs["modelQuestion"].getNewValues();
+ selectedMake(makeIndex) {
+ const parsedMakeIndex = parseInt(makeIndex);
+ this.mainStore.updateVehicleMake(this.Makes.values[parsedMakeIndex]);
+ this.Models.getNewValues();
},
- selectedModel(model) {
- this.mainStore.updateVehicleModel( model );
- this.$refs["styleQuestion"].getNewValues();
+ selectedModel(modelIndex) {
+ const parsedModelIndex = parseInt(modelIndex);
+ this.mainStore.updateVehicleModel(this.Models.values[parsedModelIndex]);
+ this.Styles.getNewValues();
},
- selectedStyle(style) {
- this.mainStore.updateVehicleStyle( style );
+ selectedStyle(styleIndex) {
+ const parsedStyleIndex = parseInt(styleIndex);
+ this.mainStore.updateVehicleStyle(this.Styles.values[parsedStyleIndex]);
},
},
+computed:{
+ Years(){
+ return this.$refs["vehicleYearQuestion"];
+ },
+ Makes(){
+ return this.$refs["vehicleMakeQuestion"];
+ },
+ Models(){
+ return this.$refs["vehicleModelQuestion"];
+ },
+ Styles(){
+ return this.$refs["vehicleStyleQuestion"];
+ }
+},
methods: {
arePagePrerequisitesValid() {
-
return true;
},
backButtonAction() {
@@ -156,6 +148,9 @@ export default {
this.$route
);
});
+ },
+ async updateYearValues() {
+ return await useMainStore().getVehicleYears();
},
async updateMakeValues() {
return await this.mainStore.getVehicleMakes();
@@ -165,19 +160,15 @@ export default {
},
async updateStyleValues() {
return await this.mainStore.getVehicleStyles();
- }
- },
-
+ },
+ },
components: {
- yearQuestion,
- makeQuestion,
- modelQuestion,
siteHeader,
siteSubHeader,
vehicleBanner,
siteFooter,
Form,
- styleQuestion,
+ vehicleQuestion
},
};
diff --git a/src/layouts/vehicle-selection/year-question/year-question.vue b/src/layouts/vehicle-selection/year-question/year-question.vue
deleted file mode 100644
index 97ba0090..00000000
--- a/src/layouts/vehicle-selection/year-question/year-question.vue
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
\ No newline at end of file