Merge 'develop' into feature/digital/SSR-179
This commit is contained in:
commit
dcbc8d08ba
5 changed files with 14 additions and 20 deletions
|
|
@ -8,8 +8,10 @@
|
||||||
:aria-disabled="isDisabled"
|
:aria-disabled="isDisabled"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
:aria-required="isRequired"
|
: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">
|
<option v-for="(value, name, index) in options" :value="name" :key="index">
|
||||||
{{ value }}
|
{{ value }}
|
||||||
</option>
|
</option>
|
||||||
|
|
@ -38,7 +40,8 @@ export default {
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
hasError: Boolean,
|
hasError: Boolean,
|
||||||
errors: Array
|
errors: Array,
|
||||||
|
placeHolderText: String
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const propsClone = Object.assign({}, props);
|
const propsClone = Object.assign({}, props);
|
||||||
|
|
@ -82,7 +85,7 @@ export default {
|
||||||
},
|
},
|
||||||
selectedOption: {
|
selectedOption: {
|
||||||
get: function() {
|
get: function() {
|
||||||
return this.modelValue;
|
return !this.modelValue ? "" : this.modelValue;
|
||||||
},
|
},
|
||||||
set: function(newValue) {
|
set: function(newValue) {
|
||||||
this.$emit("update:modelValue", newValue);
|
this.$emit("update:modelValue", newValue);
|
||||||
|
|
|
||||||
|
|
@ -96,16 +96,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
customerQuestions: {
|
customerQuestions: useMainStore().customerData,
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: "",
|
|
||||||
city: "",
|
|
||||||
state: "",
|
|
||||||
zipCode: "",
|
|
||||||
},
|
|
||||||
firstName: "",
|
|
||||||
lastName: "",
|
|
||||||
},
|
|
||||||
displayVinNotFoundAlert: false,
|
displayVinNotFoundAlert: false,
|
||||||
displayMatchedDifferentVehicleAlert: false,
|
displayMatchedDifferentVehicleAlert: false,
|
||||||
displayVinLookupByHomeAddressNotAllowedAlert: false,
|
displayVinLookupByHomeAddressNotAllowedAlert: false,
|
||||||
|
|
@ -119,9 +110,7 @@ export default {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return this.mainStore.order.vehicle.carId !== null;
|
return this.mainStore.order.vehicle.carId !== null;
|
||||||
},
|
},
|
||||||
loadDefaultsFromStore() {
|
|
||||||
this.customerQuestions = this.mainStore.customerData;
|
|
||||||
},
|
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
// route to move backwards
|
// route to move backwards
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
|
|
@ -277,7 +266,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.attachCustomEvents();
|
this.attachCustomEvents();
|
||||||
this.loadDefaultsFromStore();
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
AlertMatchedDifferentVehicleHeader() {
|
AlertMatchedDifferentVehicleHeader() {
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
:options="DamageCauseOptions"
|
:options="DamageCauseOptions"
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
validationRules="loss-cause-required"
|
validationRules="loss-cause-required"
|
||||||
|
placeHolderText="Select an option"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -73,6 +74,7 @@
|
||||||
validationRules="loss-state-required"
|
validationRules="loss-state-required"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
|
placeHolderText="Select an option"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ export const useMainStore = defineStore({
|
||||||
return state.applicationUser.pageData[page];
|
return state.applicationUser.pageData[page];
|
||||||
},
|
},
|
||||||
customerData: (state) => {
|
customerData: (state) => {
|
||||||
if (state.order.vehicle.registration.zipCode)
|
if (state.order.vehicle.registration.address)
|
||||||
{
|
{
|
||||||
const registration = state.order.vehicle.registration;
|
const registration = state.order.vehicle.registration;
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ describe("Store", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
const actual = store.customerDataAddressLookup;
|
const actual = store.customerData;
|
||||||
//Assert
|
//Assert
|
||||||
|
|
||||||
expect(actual).toEqual(expected);
|
expect(actual).toEqual(expected);
|
||||||
|
|
@ -213,7 +213,7 @@ describe("Store", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
const actual = store.customerDataAddressLookup;
|
const actual = store.customerData;
|
||||||
//Assert
|
//Assert
|
||||||
|
|
||||||
expect(actual).toEqual(expected);
|
expect(actual).toEqual(expected);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue