From acd68f97d958f207cc2c93f801866bbbee91006c Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 7 Feb 2024 16:02:22 -0500 Subject: [PATCH] Auto-route only as far as Quote for cash users. --- .../heritage-integration/navigation-helper.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 8fdfc40bb..bd2525ac2 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -123,17 +123,21 @@ async function getLatestPageForRedirection() { const scheduleComponent = await getLazyLoadedComponent(fmgPageValues.SCHEDULE); const skipVin = await skipVinLookup(); + const isInsuranceUser = !!store.getters.order.payment.isInsurance; if (!vehicleDamageComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE; } else if (!estimateComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE_DAMAGE; } else { - if (scheduleComponent.methods.arePagePrerequisitesValid()) { - return fmgPageValues.SCHEDULE; - } else if (serviceLocationComponent.methods.arePagePrerequisitesValid()) { - return fmgPageValues.SERVICE_LOCATION; - } else if (quoteComponent.methods.arePagePrerequisitesValid()) { + if (isInsuranceUser) { + if (scheduleComponent.methods.arePagePrerequisitesValid()) { + return fmgPageValues.SCHEDULE; + } else if (serviceLocationComponent.methods.arePagePrerequisitesValid()) { + return fmgPageValues.SERVICE_LOCATION; + } + } + if (quoteComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.QUOTE; } else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.CAPABILITY_QUESTIONS;