Merge remote-tracking branch 'origin/feature/CSR-104' into feature/CSR-416

This commit is contained in:
Katie 2022-05-09 16:28:14 -04:00
commit ebaf13cc56

View file

@ -181,14 +181,19 @@ export default {
this.resetWarningsAndErrors(); this.resetWarningsAndErrors();
// Lookup VIN(s) with the provided address // Lookup VIN(s) with the provided address
const vinLookup = await this.lookupVin( const vinLookup = this.lookupVin(
this.customerQuestions.lastName, this.customerQuestions.lastName,
this.customerQuestions.addressQuestions.streetAddress, this.customerQuestions.addressQuestions.streetAddress,
this.customerQuestions.addressQuestions.zipCode, this.customerQuestions.addressQuestions.zipCode,
this.customerQuestions.addressQuestions.state this.customerQuestions.addressQuestions.state
); );
if (!vinLookup.data.isStatePermissible) { const zipValidation = this.serviceZipCode ? this.validateZip(this.serviceZipCode) : this.validateZip(this.customerQuestions.addressQuestions.zipCode);
const vinLookupResponse = await vinLookup;
const zipValidationResponse = await zipValidation;
if (!vinLookupResponse.data.isStatePermissible) {
// State Restrictions forbid lookup by address // State Restrictions forbid lookup by address
this.displayVinLookupByHomeAddressNotAllowedAlert = true; this.displayVinLookupByHomeAddressNotAllowedAlert = true;
this.$refs.funnelFooter.removeLoader(); this.$refs.funnelFooter.removeLoader();
@ -196,8 +201,7 @@ export default {
} }
// Validate if the original or service zip provided is serviceable // Validate if the original or service zip provided is serviceable
const zipValidation = this.serviceZipCode ? await this.validateZip(this.serviceZipCode) : await this.validateZip(this.customerQuestions.addressQuestions.zipCode); this.isZipServicable = zipValidationResponse.data.isServiceable;
this.isZipServicable = zipValidation.data.isServiceable;
if (!this.isZipServicable) { if (!this.isZipServicable) {
this.displayNonServiceableZipAlert = true; this.displayNonServiceableZipAlert = true;
this.showServiceZipField = true; this.showServiceZipField = true;
@ -205,7 +209,7 @@ export default {
} }
const carEntered = store.getters.vehicle; const carEntered = store.getters.vehicle;
const carsFound = vinLookup.data.vinVehicles; const carsFound = vinLookupResponse.data.vinVehicles;
if (carsFound.length == 0) { if (carsFound.length == 0) {
// No VINs found // No VINs found
@ -256,7 +260,7 @@ export default {
this.displayMatchedDifferentVehicleAlert = false; this.displayMatchedDifferentVehicleAlert = false;
this.displayVinLookupByHomeAddressNotAllowedAlert = false; this.displayVinLookupByHomeAddressNotAllowedAlert = false;
}, },
async navigateForward(carEntered, carsFound) { navigateForward(carEntered, carsFound) {
if (carsFound.length == 1) { if (carsFound.length == 1) {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
this.$router.navigateAfterSave( this.$router.navigateAfterSave(