Merge pull request #2414 from Safelite/feature/CASH-353

CASH-353 - Added a check to see if it is heavy truck
This commit is contained in:
mvalaiyapathi 2025-04-10 11:48:33 -04:00 committed by GitHub
commit f55c5ee7b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 24 deletions

View file

@ -301,7 +301,7 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayInvalidZipAlert = false;
if (this.serviceZipCode != null) {
if (this.serviceZipCode != null && this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId

View file

@ -281,14 +281,15 @@ export default {
this.displayInvalidZipAlert = true;
return this.$refs.navbar.removeLoader();
}
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
if (this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
// Check if the CarId has changed.

View file

@ -276,13 +276,15 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayNonServiceableZipAlert = false;
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
if (this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
const payment = this.$store.getters.payment;

View file

@ -303,14 +303,16 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayInvalidZipAlert = false;
// If a VIN has already been found. Validate the Service Zip (in case of changes)
var closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
if (this.isHeavyTruck) {
// If a VIN has already been found. Validate the Service Zip (in case of changes)
var closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
// If either lookup fails, remove the loader and stop processing the page.