Merge 'develop' into feature/digital/SSR-179

This commit is contained in:
katie 2023-01-19 15:50:53 -05:00
commit dcbc8d08ba
5 changed files with 14 additions and 20 deletions

View file

@ -8,8 +8,10 @@
:aria-disabled="isDisabled"
:disabled="isDisabled"
:aria-required="isRequired"
:validationRules="validationRules"
:validationRules="validationRules"
:placeHolderText="placeHolderText"
>
<option v-if="placeHolderText" value="" selected>{{ placeHolderText }}</option>
<option v-for="(value, name, index) in options" :value="name" :key="index">
{{ value }}
</option>
@ -38,7 +40,8 @@ export default {
validationRules: String,
cmsWidgetName: String,
hasError: Boolean,
errors: Array
errors: Array,
placeHolderText: String
},
setup(props) {
const propsClone = Object.assign({}, props);
@ -82,7 +85,7 @@ export default {
},
selectedOption: {
get: function() {
return this.modelValue;
return !this.modelValue ? "" : this.modelValue;
},
set: function(newValue) {
this.$emit("update:modelValue", newValue);

View file

@ -96,16 +96,7 @@ export default {
},
data() {
return {
customerQuestions: {
addressQuestions: {
streetAddress: "",
city: "",
state: "",
zipCode: "",
},
firstName: "",
lastName: "",
},
customerQuestions: useMainStore().customerData,
displayVinNotFoundAlert: false,
displayMatchedDifferentVehicleAlert: false,
displayVinLookupByHomeAddressNotAllowedAlert: false,
@ -119,9 +110,7 @@ export default {
arePagePrerequisitesValid() {
return this.mainStore.order.vehicle.carId !== null;
},
loadDefaultsFromStore() {
this.customerQuestions = this.mainStore.customerData;
},
backButtonAction() {
// route to move backwards
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
@ -277,7 +266,7 @@ export default {
},
mounted() {
this.attachCustomEvents();
this.loadDefaultsFromStore();
},
computed: {
AlertMatchedDifferentVehicleHeader() {

View file

@ -47,6 +47,7 @@
:options="DamageCauseOptions"
disableAutoFill
validationRules="loss-cause-required"
placeHolderText="Select an option"
/>
</div>
</div>
@ -73,6 +74,7 @@
validationRules="loss-state-required"
isRequired
disableAutoFill
placeHolderText="Select an option"
/>
</div>
</div>

View file

@ -128,7 +128,7 @@ export const useMainStore = defineStore({
return state.applicationUser.pageData[page];
},
customerData: (state) => {
if (state.order.vehicle.registration.zipCode)
if (state.order.vehicle.registration.address)
{
const registration = state.order.vehicle.registration;
return {

View file

@ -181,7 +181,7 @@ describe("Store", () => {
};
//Act
const actual = store.customerDataAddressLookup;
const actual = store.customerData;
//Assert
expect(actual).toEqual(expected);
@ -213,7 +213,7 @@ describe("Store", () => {
};
//Act
const actual = store.customerDataAddressLookup;
const actual = store.customerData;
//Assert
expect(actual).toEqual(expected);