From aa90ddfccdb6f616c9d8160fb394bb41f807c5c0 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 14 Jul 2022 12:58:04 -0400 Subject: [PATCH] Re-add vin-lookup changes for test page. So Quote page will work locally. --- src/layouts/vin-lookup/vin-lookup.vue | 50 ++++++++++---------- src/router/router-constants/routing-table.js | 15 +++--- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 5a7a2c560..77fb3f23e 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -56,19 +56,19 @@ /> - + { this.pushEventToGA( this.$route.query[this.queryStrings.FMG_PAGE], @@ -243,9 +243,9 @@ export default { if (this.serviceZipCode && !isZipValid) { this.displayInvalidZipAlert = true; return this.$refs.funnelFooter.removeLoader(); - } + } this.displayInvalidZipAlert = false; - + // If either lookup fails, remove the loader and stop processing the page. if (!resultMap.vehicleLookupResponse || !resultMap.serviceZipValidationResponse.isServiceable) { // If the vehicle result is undefined, the vin entered was invalid. @@ -270,7 +270,7 @@ export default { this.previouslyEnteredCarId = resultMap.vehicleLookupResponse.carId; this.customAlertData.vehicleInfo = resultMap.vehicleLookupResponse; this.displayMatchedDifferentVehicleAlert = true; - + this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(resultMap.vehicleLookupResponse.carId); // Update button "Continue with..." @@ -292,12 +292,12 @@ export default { }, false); return await this.navigateForward(); - + } // If a VIN has already been found. Validate the Service Zip (in case of changes) const zipValidationResponse = await this.dispatchStoreAction(storeActions.VALIDATE_ZIP, {zip: this.serviceZipCode}); - + // Check if Service Zip entered is serviceable if (zipValidationResponse.data.isServiceable) { // If the Service Zip entered is serviceable then save the Zip Info and Email Address and navigate forward @@ -330,12 +330,12 @@ export default { return this.$refs.funnelFooter.removeLoader(); }, async navigateForward(){ - if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { - this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); - } else { - await this.navigateForwardWithSingleCarMatch(); - } - + this.$router.navigate(this.navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, this.$route, {}, {}); + if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) { + this.$router.navigate(this.navigationScenarios.SELECTED_VIN_HAS_MISMATCHED_GLASS, this.$route, {}, { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }); + } else { + await this.navigateForwardWithSingleCarMatch(); + } }, }, mounted() { @@ -379,8 +379,8 @@ export default { } else { return 'XXXXXXXXXXXXXXXXX'; - } - }, + } + }, }, watch: { vin() { @@ -397,10 +397,10 @@ export default { vehicleBanner, funnelSubHeader, textboxQuestion, - alert, + alert, vinInformation, loadingModal, - Form, + Form, }, }; diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 127561bd2..da76e73cc 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -114,12 +114,13 @@ const routingTable = [ }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, - destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + //destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + destinationFmgPageValue: fmgPageValues.QUOTE, }, { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + }, ], }, { @@ -178,7 +179,7 @@ const routingTable = [ { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, - }, + }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS @@ -186,11 +187,7 @@ const routingTable = [ { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - }, - { - scenario: navigationScenarios.SELECTED_PROVIDE_VIN_DIFFERENT_WAY, - destinationFmgPageValue: fmgPageValues.ESTIMATE - } + } ], }, { @@ -233,4 +230,4 @@ const routingTable = [ }, ]; -export { routingTable }; \ No newline at end of file +export { routingTable };