diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 0cc7d5e03..aa4aec2a1 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -166,7 +166,7 @@ export default { }, handleCheckedChanged(val) { if(this.selectingInitiatesLoad) { - this.selectedValues = [val.value]; + this.selectedValues = val.value; } else { if(Array.isArray(this.selectedValues)) { const newSelectedValues = this.selectedValues; diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index e6272b2fd..984a40fec 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -81,7 +81,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.HOMEADDRESS] + selectedVinLookupMethod: vinLookupMethodSelections.HOMEADDRESS }) //Act @@ -97,7 +97,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.MANUALVIN] + selectedVinLookupMethod: vinLookupMethodSelections.MANUALVIN }) //Act @@ -132,7 +132,7 @@ describe("estimate.vue", () => { //Arrange const { wrapper } = setupMocks({}); await wrapper.setData({ - selectedValues: [vinLookupMethodSelections.LICENSEPLATE] + selectedVinLookupMethod: vinLookupMethodSelections.LICENSEPLATE }) //Act diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 8a8fe51e7..9abfd17d8 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -21,7 +21,7 @@ :answers="answersFromCms" groupName="vinLookupMethodOption" buttonType="listButton" - v-model="selectedValues" + v-model="selectedVinLookupMethod" isRequired validationRules="option-required" /> @@ -60,7 +60,7 @@ export default { name: "estimate", data() { return { - selectedValues: [], + selectedVinLookupMethod: "", }; }, @@ -94,20 +94,20 @@ export default { ); }, async forwardButtonAction() { - if (this.selectedValues[0] === vinLookupMethodSelections.MANUALVIN) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.MANUALVIN) { await this.dispatchStoreAction(storeActions.CLEAR_VIN); return this.$router.navigate( this.navigationScenarios.SELECTED_MANUAL_VIN, this.$route ); } - if (this.selectedValues[0] === vinLookupMethodSelections.LICENSEPLATE) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.LICENSEPLATE) { return this.$router.navigate( this.navigationScenarios.SELECTED_LICENSE_PLATE, this.$route ); } - if (this.selectedValues[0] === vinLookupMethodSelections.HOMEADDRESS) { + if (this.selectedVinLookupMethod === vinLookupMethodSelections.HOMEADDRESS) { return this.$router.navigate( this.navigationScenarios.SELECTED_HOME_ADDRESS, this.$route diff --git a/src/layouts/vehicle-make/make-question/make-question.vue b/src/layouts/vehicle-make/make-question/make-question.vue index 5319d96f2..c84c1cdbf 100644 --- a/src/layouts/vehicle-make/make-question/make-question.vue +++ b/src/layouts/vehicle-make/make-question/make-question.vue @@ -36,8 +36,7 @@ export default { }, selectedValue: { get: function() { - const modelValueAsArray = this.modelValue ? [this.modelValue] : []; - return modelValueAsArray; + return this.modelValue }, set: function(newValue) { this.$emit("update:modelValue", newValue); diff --git a/src/layouts/vehicle-model/model-question/model-question.vue b/src/layouts/vehicle-model/model-question/model-question.vue index 5d2b1ebd2..3f4e3be7e 100644 --- a/src/layouts/vehicle-model/model-question/model-question.vue +++ b/src/layouts/vehicle-model/model-question/model-question.vue @@ -36,8 +36,7 @@ export default { }, selectedValue: { get: function() { - const modelValueAsArray = this.modelValue ? [this.modelValue] : []; - return modelValueAsArray; + return this.modelValue }, set: function(newValue) { this.$emit("update:modelValue", newValue); diff --git a/src/layouts/vehicle-style/style-question/style-question.vue b/src/layouts/vehicle-style/style-question/style-question.vue index e578bc192..e04822cd6 100644 --- a/src/layouts/vehicle-style/style-question/style-question.vue +++ b/src/layouts/vehicle-style/style-question/style-question.vue @@ -36,8 +36,7 @@ export default { }, selectedValue: { get: function() { - const modelValueAsArray = this.modelValue ? [this.modelValue] : []; - return modelValueAsArray; + return this.modelValue }, set: function(newValue) { this.$emit("update:modelValue", newValue); diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue index 370fdb213..4587172e7 100644 --- a/src/layouts/vehicle-style/vehicle-style.vue +++ b/src/layouts/vehicle-style/vehicle-style.vue @@ -23,12 +23,12 @@ import styleQuestion from "@/layouts/vehicle-style/style-question/style-question import funnelHeader from "@/common-components/funnel-header/funnel-header"; import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; 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 { storeActions } from "@/constants/store-actions"; import store from "@/store"; -import { storeMutations } from "@/constants/store-mutations"; export default { name: "vehicle-style", diff --git a/src/layouts/vehicle-year/year-question/year-question.vue b/src/layouts/vehicle-year/year-question/year-question.vue index ff2e2902a..5892c5dd9 100644 --- a/src/layouts/vehicle-year/year-question/year-question.vue +++ b/src/layouts/vehicle-year/year-question/year-question.vue @@ -37,8 +37,7 @@ export default { }, selectedValue: { get: function() { - const modelValueAsArray = this.modelValue ? [this.modelValue] : []; - return modelValueAsArray; + return this.modelValue }, set: function(newValue) { this.$emit("update:modelValue", newValue); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index d5943ecdb..e854f034e 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -177,6 +177,7 @@ export default { previouslyEnteredCarId: '', invalidZip: '', vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0, + isSelectedGlassAvailableForVehicle: true }; }, mounted() { diff --git a/src/store/index.js b/src/store/index.js index 7785a47fc..0d8689242 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -706,7 +706,6 @@ export const actions = { } }, saveVehicleStyle(context, style) { - //Reset dependent state when changing if (context.state.order.vehicle.style !== style) { context.commit(storeMutations.UPDATE_CAR_ID, null);