Merge branch 'develop' into feature/CSR-108

This commit is contained in:
Adam Caouette 2022-07-12 09:17:26 -04:00
commit 3818afbe24
10 changed files with 15 additions and 19 deletions

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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",

View file

@ -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);

View file

@ -177,6 +177,7 @@ export default {
previouslyEnteredCarId: '',
invalidZip: '',
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
isSelectedGlassAvailableForVehicle: true
};
},
mounted() {

View file

@ -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);