Fixed issue with address-lookup triggering validation when autopopulating empty values on load and the user getting a page full of errors on first load
This commit is contained in:
parent
2bba9ac1f4
commit
68a63de959
2 changed files with 4 additions and 15 deletions
|
|
@ -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.customerDataAddressLookup;
|
||||
},
|
||||
|
||||
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() {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ export const useMainStore = defineStore({
|
|||
pageData: (state) => (page) => {
|
||||
return state.applicationUser.pageData[page];
|
||||
},
|
||||
customerDataAddressLookup: (state) => {
|
||||
customerData: (state) => {
|
||||
if (state.order.vehicle.registration.address)
|
||||
{
|
||||
const registration = state.order.vehicle.registration;
|
||||
|
|
|
|||
Loading…
Reference in a new issue