CASH-845: routing changes

This commit is contained in:
AdamCaouetteSafelite 2025-07-02 12:34:50 -04:00
parent 94dea85a94
commit 2a89bd86a4
8 changed files with 49 additions and 38 deletions

View file

@ -13,8 +13,9 @@ const pagePercentageMapper = {
"capability-questions": 40, "capability-questions": 40,
quote: 48, quote: 48,
"insurance-company": 52, "insurance-company": 52,
"service-location": 60, // TODO: REMOVE THIS COMMENT AND BELOW, ONCE CASH-803 (SERVICE-LOCATION AND SCHEDULE PAGE COMBINATION) HAS BEEN VETTED
schedule: 72, // "service-location": 60,
schedule: 64,
"mobile-details": 76, "mobile-details": 76,
"customer-details": 84, "customer-details": 84,
"payment-method": 92, "payment-method": 92,

View file

@ -1332,10 +1332,4 @@ export default {
} }
</style> </style>
<!-- OLD DATE-PICKER ENDS --> <!-- OLD DATE-PICKER ENDS -->

View file

@ -845,6 +845,4 @@ export default {
} }
</style> </style>
<!-- OLD SERVICE LOCATION ENDS --> <!-- OLD SERVICE LOCATION ENDS -->

View file

@ -55,10 +55,11 @@ export const routeData = {
name: "insurance-company", name: "insurance-company",
path: "/insurance-company", path: "/insurance-company",
}, },
SERVICE_LOCATION: { // TODO: REMOVE THIS COMMENT AND BELOW, ONCE CASH-803 (SERVICE-LOCATION AND SCHEDULE PAGE COMBINATION) HAS BEEN VETTED
name: "service-location", // SERVICE_LOCATION: {
path: "/service-location", // name: "service-location",
}, // path: "/service-location",
// },
HERITAGE: { HERITAGE: {
name: "heritage", name: "heritage",
path: "/virtual/heritage", path: "/virtual/heritage",

View file

@ -421,7 +421,7 @@ const routingTable = function () {
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_CASH, scenario: navigationScenarios.CLICKED_FORWARD_WITH_CASH,
destinationPageData: routeData.SERVICE_LOCATION, destinationPageData: routeData.SCHEDULE,
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_INSURANCE, scenario: navigationScenarios.CLICKED_FORWARD_WITH_INSURANCE,
@ -449,8 +449,26 @@ const routingTable = function () {
}, },
], ],
}, },
// TODO: REMOVE THIS COMMENT AND BELOW, ONCE CASH-803 (SERVICE-LOCATION AND SCHEDULE PAGE COMBINATION) HAS BEEN VETTED
// {
// pageName: routeData.SERVICE_LOCATION.name,
// maps: [
// {
// scenario: navigationScenarios.CLICKED_BACK,
// destinationPageData: routeData.QUOTE,
// },
// {
// scenario: navigationScenarios.CLICKED_FORWARD,
// destinationPageData: routeData.SCHEDULE,
// },
// {
// scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOBILE_SERVICE,
// destinationPageData: routeData.MOBILE_DETAILS,
// },
// ],
// },
{ {
pageName: routeData.SERVICE_LOCATION.name, pageName: routeData.SCHEDULE.name,
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
@ -458,37 +476,24 @@ const routingTable = function () {
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationPageData: routeData.SCHEDULE, destinationPageData: routeData.CUSTOMER_DETAILS,
}, },
// {
// scenario: navigationScenarios.CLICKED_CHANGE_LOCATION,
// destinationPageData: routeData.SERVICE_LOCATION,
// },
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOBILE_SERVICE, scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOBILE_SERVICE,
destinationPageData: routeData.MOBILE_DETAILS, destinationPageData: routeData.MOBILE_DETAILS,
}, },
], ],
}, },
{
pageName: routeData.SCHEDULE.name,
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
destinationPageData: routeData.SERVICE_LOCATION,
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationPageData: routeData.CUSTOMER_DETAILS,
},
{
scenario: navigationScenarios.CLICKED_CHANGE_LOCATION,
destinationPageData: routeData.SERVICE_LOCATION,
},
],
},
{ {
pageName: routeData.MOBILE_DETAILS.name, pageName: routeData.MOBILE_DETAILS.name,
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationPageData: routeData.SERVICE_LOCATION, destinationPageData: routeData.SCHEDULE,
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,

View file

@ -1,6 +1,7 @@
import { queryStrings } from "@/constants/query-strings"; import { queryStrings } from "@/constants/query-strings";
import { consumeReferralQuerystrings } from "@/router/methods/helpers/consume-referral-info"; import { consumeReferralQuerystrings } from "@/router/methods/helpers/consume-referral-info";
import { loadSessionIfPresent } from "@/helpers/heritage-integration/order-helper"; import { loadSessionIfPresent } from "@/helpers/heritage-integration/order-helper";
import router from "@/router";
import { routeData } from "@/router/constants/routes"; import { routeData } from "@/router/constants/routes";
export async function handleHeritageReturn(to, from) { export async function handleHeritageReturn(to, from) {
@ -11,6 +12,16 @@ export async function handleHeritageReturn(to, from) {
await consumeReferralQuerystrings(); await consumeReferralQuerystrings();
// load session with new cookie // load session with new cookie
await loadSessionIfPresent(true, routeData.SERVICE_LOCATION.name); await loadSessionIfPresent(true, routeData.SCHEDULE.name);
// Temporary redirect until URLs to old service-location page can be updated in Heritage
if (
to.fullPath.includes("fmgPage=service-location")
) {
// Redirect to Schedule page
router.push({
name: routeData.SCHEDULE.name,
});
}
} }
} }

View file

@ -29,7 +29,8 @@ export const routes = [
createRoute(routeData.CAPABILITY_QUESTIONS), createRoute(routeData.CAPABILITY_QUESTIONS),
createRoute(routeData.QUOTE, quoteBeforeEnter), createRoute(routeData.QUOTE, quoteBeforeEnter),
createRoute(routeData.INSURANCE_COMPANY, insuranceCompanyBeforeEnter), createRoute(routeData.INSURANCE_COMPANY, insuranceCompanyBeforeEnter),
createRoute(routeData.SERVICE_LOCATION), // TODO: REMOVE THIS COMMENT AND BELOW, ONCE CASH-803 (SERVICE-LOCATION AND SCHEDULE PAGE COMBINATION) HAS BEEN VETTED
// createRoute(routeData.SERVICE_LOCATION),
createRoute(routeData.SCHEDULE), createRoute(routeData.SCHEDULE),
createRoute(routeData.CUSTOMER_DETAILS), createRoute(routeData.CUSTOMER_DETAILS),
createRoute(routeData.PAYMENT_METHOD, paymentMethodBeforeEnter), createRoute(routeData.PAYMENT_METHOD, paymentMethodBeforeEnter),