Merge pull request #130 from Safelite/feature/Digital/SSR-228
Fixed issue with address-lookup triggering validation when autopopula…
This commit is contained in:
commit
575aa01b9d
3 changed files with 6 additions and 17 deletions
|
|
@ -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.customerDataAddressLookup;
|
|
||||||
},
|
|
||||||
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() {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ export const useMainStore = defineStore({
|
||||||
pageData: (state) => (page) => {
|
pageData: (state) => (page) => {
|
||||||
return state.applicationUser.pageData[page];
|
return state.applicationUser.pageData[page];
|
||||||
},
|
},
|
||||||
customerDataAddressLookup: (state) => {
|
customerData: (state) => {
|
||||||
if (state.order.vehicle.registration.address)
|
if (state.order.vehicle.registration.address)
|
||||||
{
|
{
|
||||||
const registration = state.order.vehicle.registration;
|
const registration = state.order.vehicle.registration;
|
||||||
|
|
|
||||||
|
|
@ -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