From 459682d8a091cf25a02d4574d1d0056ab604e36d Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Mon, 29 Jul 2024 16:55:47 +0530 Subject: [PATCH] CSR-2087 remove condition store.getters.applicationUser.triggeredSiteEntry not required --- src/router/index.js | 65 +++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 94c3dbe9b..f93b08ee6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -128,50 +128,39 @@ const routes = [ (leadGenDamage.toUpperCase() != "WINDSHIELDREPAIR" || leadGenNumberOfChips?.length > 0) ) { - if (!store.getters.applicationUser.triggeredSiteEntry) { - store.commit(storeMutations.UPDATE_IS_LEAD_GEN, true); - store.commit(storeMutations.UPDATE_LEAD_GEN_YEAR, leadGenYear); - store.commit(storeMutations.UPDATE_LEAD_GEN_MAKE, leadGenMake); - store.commit(storeMutations.UPDATE_LEAD_GEN_MODEL, leadGenModel); - store.commit(storeMutations.UPDATE_LEAD_GEN_STYLE, leadGenStyle); + store.commit(storeMutations.UPDATE_IS_LEAD_GEN, true); + store.commit(storeMutations.UPDATE_LEAD_GEN_YEAR, leadGenYear); + store.commit(storeMutations.UPDATE_LEAD_GEN_MAKE, leadGenMake); + store.commit(storeMutations.UPDATE_LEAD_GEN_MODEL, leadGenModel); + store.commit(storeMutations.UPDATE_LEAD_GEN_STYLE, leadGenStyle); + store.commit(storeMutations.UPDATE_LEAD_GEN_DAMAGE_TYPE, leadGenDamage); + if (leadGenDamage.toUpperCase() == "WINDSHIELDREPLACE") { + store.commit(storeMutations.UPDATE_LEAD_GEN_IS_REPAIR, false); + store.commit(storeMutations.UPDATE_LEAD_GEN_NUMBER_OF_CHIPS, null); + } else if (leadGenDamage.toUpperCase() == "WINDSHIELDREPAIR") { + store.commit(storeMutations.UPDATE_LEAD_GEN_IS_REPAIR, true); store.commit( - storeMutations.UPDATE_LEAD_GEN_DAMAGE_TYPE, - leadGenDamage + storeMutations.UPDATE_LEAD_GEN_NUMBER_OF_CHIPS, + leadGenNumberOfChips ); - if (leadGenDamage.toUpperCase() == "WINDSHIELDREPLACE") { - store.commit(storeMutations.UPDATE_LEAD_GEN_IS_REPAIR, false); - store.commit( - storeMutations.UPDATE_LEAD_GEN_NUMBER_OF_CHIPS, - null - ); - } else if (leadGenDamage.toUpperCase() == "WINDSHIELDREPAIR") { - store.commit(storeMutations.UPDATE_LEAD_GEN_IS_REPAIR, true); - store.commit( - storeMutations.UPDATE_LEAD_GEN_NUMBER_OF_CHIPS, - leadGenNumberOfChips - ); - } + } + store.commit(storeMutations.UPDATE_LEAD_GEN_ZIP_CODE, leadGenZipCode); + store.commit( + storeMutations.UPDATE_LEAD_GEN_EMAIL_ADDRESS, + leadGenEmail + ); + if (leadGenIsInsurance == "true") { + store.commit(storeMutations.UPDATE_LEAD_GEN_IS_INSURANCE, true); store.commit( - storeMutations.UPDATE_LEAD_GEN_ZIP_CODE, - leadGenZipCode + storeMutations.UPDATE_LEAD_GEN_SERVICE_PACKAGE, + leadGenServicePackage ); + } + if (leadGenDamage.toUpperCase() != "WINDSHIELDREPAIR") { store.commit( - storeMutations.UPDATE_LEAD_GEN_EMAIL_ADDRESS, - leadGenEmail + storeMutations.UPDATE_LEAD_GEN_VIN_SELECTION, + leadGenVinSelection ); - if (leadGenIsInsurance == "true") { - store.commit(storeMutations.UPDATE_LEAD_GEN_IS_INSURANCE, true); - store.commit( - storeMutations.UPDATE_LEAD_GEN_SERVICE_PACKAGE, - leadGenServicePackage - ); - } - if (leadGenDamage.toUpperCase() != "WINDSHIELDREPAIR") { - store.commit( - storeMutations.UPDATE_LEAD_GEN_VIN_SELECTION, - leadGenVinSelection - ); - } } }