We now populate the service zip code with the registration zip code when the registration zip code is serviceable and the service zip code is not entered
This commit is contained in:
parent
9217a25ec6
commit
5e0174c64a
1 changed files with 7 additions and 2 deletions
|
|
@ -186,6 +186,7 @@ export default {
|
|||
this.customerQuestions.addressQuestions.state
|
||||
);
|
||||
|
||||
// Verify if the service zip code or registration zip code provided is serviceable
|
||||
const zipValidation = this.serviceZipCode ? this.validateZip(this.serviceZipCode) : this.validateZip(this.customerQuestions.addressQuestions.zipCode);
|
||||
|
||||
const vinLookupResponse = await vinLookup;
|
||||
|
|
@ -198,12 +199,16 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
// Validate if the original or service zip provided is serviceable
|
||||
// if the neither the registration zip code or service zip code are not serviceable
|
||||
this.isZipServicable = zipValidationResponse.data.isServiceable;
|
||||
if (!this.isZipServicable) {
|
||||
if (!this.isZipServicable) {
|
||||
this.displayNonServiceableZipAlert = true;
|
||||
this.showServiceZipField = true;
|
||||
this.$refs.funnelFooter.removeLoader();
|
||||
} else if (!this.serviceZipCode) {
|
||||
// if the registration zip code is servicable and nothing was entered for the service zip code
|
||||
// then set the service zip code to the registration zip code
|
||||
this.serviceZipCode = this.customerQuestions.addressQuestions.zipCode;
|
||||
}
|
||||
|
||||
const carEntered = store.getters.vehicle;
|
||||
|
|
|
|||
Loading…
Reference in a new issue