Redirect to confirmation if submitted order is present

This commit is contained in:
Chloe Herd 2023-11-01 15:32:00 -04:00
parent e63f8bdcc4
commit 36ab8e04eb

View file

@ -55,8 +55,17 @@ const routes = [
await GoToFunnelStartOn404(next);
}
// Intercept all navigation if a submitted order exists in storage
if (store.getters.hasSubmittedOrder) {
if (to.query.fmgPage !== "vehicle") {
to.query.fmgPage = "confirmation";
}
}
// On entering the funnel "fresh", read cookie information, decide what to do next. payment pages used to return from safelitehop so exclude here
if (from.redirectedFrom === undefined && !to.query.fmgPage.startsWith("payment")) {
else if (
from.redirectedFrom === undefined &&
!to.query.fmgPage.startsWith("payment")
) {
// clear the saveSessionPromise - if it exists in the vuex store but a new instance was created
// the saveSessionPromise will no longer point to a valid promise
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);