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:
commit
c598dbf2dd
1 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue