From 69e6fa4173c6b12777e7eb200665b1eb63da8c66 Mon Sep 17 00:00:00 2001 From: FrankRua Date: Thu, 7 Jul 2022 09:34:13 -0400 Subject: [PATCH 1/4] changed from arrays to string --- src/common-components/button-question/button-question.vue | 2 +- src/layouts/vehicle-make/make-question/make-question.vue | 3 +-- src/layouts/vehicle-model/model-question/model-question.vue | 3 +-- src/layouts/vehicle-style/style-question/style-question.vue | 3 +-- src/layouts/vehicle-style/vehicle-style.vue | 2 +- src/layouts/vehicle-year/year-question/year-question.vue | 3 +-- src/store/index.js | 1 + 7 files changed, 7 insertions(+), 10 deletions(-) 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/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/store/index.js b/src/store/index.js index 7785a47fc..f41a5ff1f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -707,6 +707,7 @@ export const actions = { }, saveVehicleStyle(context, style) { + console.log(context.state.order.vehicle.style, style); //Reset dependent state when changing if (context.state.order.vehicle.style !== style) { context.commit(storeMutations.UPDATE_CAR_ID, null); From 44366e9dbe410152b7296d0d7d918bf1a1152779 Mon Sep 17 00:00:00 2001 From: FrankRua Date: Thu, 7 Jul 2022 09:35:23 -0400 Subject: [PATCH 2/4] remove console log --- src/store/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index f41a5ff1f..0d8689242 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -706,8 +706,6 @@ export const actions = { } }, saveVehicleStyle(context, style) { - - console.log(context.state.order.vehicle.style, style); //Reset dependent state when changing if (context.state.order.vehicle.style !== style) { context.commit(storeMutations.UPDATE_CAR_ID, null); From fb02189681e173b3b3913f7894b8ee25eb82980c Mon Sep 17 00:00:00 2001 From: Katie Date: Thu, 7 Jul 2022 16:03:16 -0400 Subject: [PATCH 3/4] Add missing property in vin-lookup --- src/layouts/vin-lookup/vin-lookup.vue | 1 + 1 file changed, 1 insertion(+) 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() { From b2e03e8ee0b1f2ab2b2bead9ebcb275ea2719d8b Mon Sep 17 00:00:00 2001 From: Katie Date: Mon, 11 Jul 2022 09:16:04 -0400 Subject: [PATCH 4/4] CSR-725 Change variable name, change type from array to string --- src/layouts/estimate/estimate.spec.js | 6 +++--- src/layouts/estimate/estimate.vue | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) 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