Merge pull request #413 from Safelite/feature/CSR-104

Feature/csr 104
This commit is contained in:
Leah Schumann 2022-05-10 17:00:49 -04:00 committed by GitHub
commit 4ae205aea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,6 +186,7 @@ export default {
this.customerQuestions.addressQuestions.state 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 zipValidation = this.serviceZipCode ? this.validateZip(this.serviceZipCode) : this.validateZip(this.customerQuestions.addressQuestions.zipCode);
const vinLookupResponse = await vinLookup; const vinLookupResponse = await vinLookup;
@ -198,12 +199,16 @@ export default {
return; 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; this.isZipServicable = zipValidationResponse.data.isServiceable;
if (!this.isZipServicable) { if (!this.isZipServicable) {
this.displayNonServiceableZipAlert = true; this.displayNonServiceableZipAlert = true;
this.showServiceZipField = true; this.showServiceZipField = true;
this.$refs.funnelFooter.removeLoader(); 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; const carEntered = store.getters.vehicle;