start of pre-populating zip code
This commit is contained in:
parent
a59440d823
commit
8ef119c113
2 changed files with 12 additions and 5 deletions
|
|
@ -120,6 +120,9 @@ export default {
|
|||
arePagePrerequisitesValid() {
|
||||
return this.mainStore.order.vehicle.carId !== null;
|
||||
},
|
||||
loadDefaultsFromStore() {
|
||||
this.customerQuestions = this.mainStore.customerData.addressQuestions.zipCode;
|
||||
},
|
||||
backButtonAction() {
|
||||
// route to move backwards
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
|
|
@ -139,8 +142,11 @@ export default {
|
|||
this.resetWarningsAndErrors();
|
||||
|
||||
// Lookup VIN
|
||||
const vinLookupResponse = useMainStore().lookupVinByPlate(
|
||||
this.licensePlate, this.licenseState);
|
||||
const vinLookupResponse = useMainStore().lookupVinByPlate({
|
||||
licensePlate: this.customerQuestions.licensePlate,
|
||||
licenseState: this.licenseState,
|
||||
});
|
||||
|
||||
const registrationZipValidationResponse = useMainStore().validateZip( { zip: this.registrationZipCode });
|
||||
|
||||
// Settle promises and get results
|
||||
|
|
@ -212,7 +218,7 @@ export default {
|
|||
},
|
||||
},
|
||||
false
|
||||
);8
|
||||
);
|
||||
|
||||
return await this.navigateForward();
|
||||
},
|
||||
|
|
@ -237,6 +243,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.attachCustomEvents();
|
||||
this.loadDefaultsFromStore();
|
||||
},
|
||||
computed: {
|
||||
AlertMatchedDifferentVehicleHeader() {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ export const useMainStore = defineStore({
|
|||
return state.applicationUser.pageData[page];
|
||||
},
|
||||
customerData: (state) => {
|
||||
if (state.order.vehicle.registration.address)
|
||||
if (state.order.vehicle.registration.zipCode)
|
||||
{
|
||||
const registration = state.order.vehicle.registration;
|
||||
return {
|
||||
|
|
@ -306,7 +306,7 @@ export const useMainStore = defineStore({
|
|||
endpoint: endpoints.LookupVinByPlate.url,
|
||||
payload: {
|
||||
licensePlate: licensePlate,
|
||||
licenseState: "IL", // hard coded until Welcome Page is complete and license state can be pulled from store
|
||||
licenseState: licenseState,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue