diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 913fbcb1b..db7881527 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -31,7 +31,8 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita // Return that page, so that it can navigate like normal. if ( toRoute.query[queryStrings.FMG_PAGE] !== undefined && - toRoute.query[queryStrings.FMG_PAGE] !== fmgPageValues.QUOTE && + toRoute.query[queryStrings.FMG_PAGE] !== fmgPageValues.SERVICE_LOCATION && + toRoute.query[queryStrings.FMG_PAGE] !== fmgPageValues.SCHEDULE && !isVinRelatedPage(toRoute) ) { return overrideYmmsDirectionIfNeeded(toRoute); @@ -115,6 +116,8 @@ async function getLatestPageForRedirection() { fmgPageValues.CAPABILITY_QUESTIONS ); const quoteComponent = await getLazyLoadedComponent(fmgPageValues.QUOTE); + const serviceLocationComponent = await getLazyLoadedComponent(fmgPageValues.SERVICE_LOCATION); + const scheduleComponent = await getLazyLoadedComponent(fmgPageValues.SCHEDULE); const skipVin = await skipVinLookup(); @@ -129,7 +132,13 @@ async function getLatestPageForRedirection() { } else if (!estimateComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE_DAMAGE; } else { - if (quoteComponent.methods.arePagePrerequisitesValid()) { + if (scheduleComponent.methods.arePagePrerequisitesValid()) { + return fmgPageValues.SCHEDULE; + } else if (serviceLocationComponent.methods.arePagePrerequisitesValid()) { + // This should be reversed 45+ days after the 8.24 release (Sunday October 8th, 2023) + //return fmgPageValues.SERVICE_LOCATION; + return fmgPageValues.QUOTE; + } else if (quoteComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.QUOTE; } else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.CAPABILITY_QUESTIONS; diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 29e6a9a9e..50cbfa128 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -44,7 +44,7 @@ export default { }, watch: { availableLineItems() { - if (this.allGlassPartsAndSupportingItemsHavePrices(this.$store.getters.lineItems)) { + if (this.$store.getters.payment.isInsurance != null) { this.selectDefaultPackage(); } }, @@ -230,30 +230,6 @@ export default { } this.selectedPackageName = lowestTierForPackage; }, - allGlassPartsAndSupportingItemsHavePrices(lineItems) { - if (lineItems?.glassParts) { - for (let i = 0; i < lineItems.glassParts.length; i++) { - if (this.priceIsNullOrZero(lineItems.glassParts[i])) { - return false; - } - } - } - if (lineItems?.supportingItems) { - for (let i = 0; i < lineItems.supportingItems.length; i++) { - if (this.priceIsNullOrZero(lineItems.supportingItems[i])) { - return false; - } - } - } - return true; - }, - priceIsNullOrZero(lineItem) { - return ( - (lineItem.kitPrice == null || lineItem.kitPrice == 0) && - (lineItem.laborAmount == null || lineItem.laborAmount == 0) && - (lineItem.sellingPrice == null || lineItem.sellingPrice == 0) - ); - }, getLowestTierForThisItem(vapsItem) { let lowestTierForThisItem = null; switch (vapsItem.partType) { diff --git a/src/store/index.js b/src/store/index.js index e91962a11..9b52e08a4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1429,7 +1429,7 @@ export const actions = { InsuranceCoverage: { isVerified: order.payment.insuranceCoverage.isVerified ?? false, }, - isInsurance: order.payment.isInsurance ?? false, + isInsurance: order.payment.isInsurance, parentAccountNumber: order.payment.parentAccountNumber, }, serviceLocation: {