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

Added loading modal when the entered vehicle is found or the glass is…
This commit is contained in:
Leah Schumann 2022-05-11 09:13:52 -04:00 committed by GitHub
commit c598dbf2dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,14 +265,20 @@ export default {
}, },
navigateForward(carEntered, carsFound) { navigateForward(carEntered, carsFound) {
if (carsFound.length == 1) { if (carsFound.length == 1) {
// if a different vehicle is found than the one entered and the selected glass
// is not available for that vehicle
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
this.$router.navigateAfterSave( this.$router.navigateAfterSave(
// then navigate back to "vehicle-damage", and display vehicle changed alert
// on that page
this.navigationScenarios.CONTINUING_WITH_DIFFERENT_GLASS, this.navigationScenarios.CONTINUING_WITH_DIFFERENT_GLASS,
this.$route, {}, { this.$route, {}, {
displayVehicleChangeAlert: true displayVehicleChangeAlert: true
}, {} }, {}
); );
} else { } else {
// otherwise
this.$refs.loadingModal.showModal();
navigateAfterSaveToHeritageFunnel(this.$route); navigateAfterSaveToHeritageFunnel(this.$route);
} }
} else if (carsFound.length > 1) { } else if (carsFound.length > 1) {