CASH-462 | Prettier changes
This commit is contained in:
parent
43d1353e52
commit
af9775aa3b
3 changed files with 22 additions and 10 deletions
|
|
@ -1,3 +1,3 @@
|
|||
export const sessionStorageKeyConstants = {
|
||||
SUBMITTED_STATE: "submittedState"
|
||||
}
|
||||
export const sessionStorageKeyConstants = {
|
||||
SUBMITTED_STATE: "submittedState",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -199,17 +199,25 @@ export default {
|
|||
}
|
||||
},
|
||||
getSubmittedOrder() {
|
||||
return JSON.parse(window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE))?.order;
|
||||
return JSON.parse(
|
||||
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE)
|
||||
)?.order;
|
||||
},
|
||||
hasSubmittedOrder() {
|
||||
const submittedState = window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE);
|
||||
const submittedState = window.sessionStorage.getItem(
|
||||
sessionStorageKeyConstants.SUBMITTED_STATE
|
||||
);
|
||||
return submittedState !== null && submittedState.order !== null;
|
||||
},
|
||||
getSubmittedApplicationUser() {
|
||||
return JSON.parse(window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE))?.applicationUser;
|
||||
return JSON.parse(
|
||||
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE)
|
||||
)?.applicationUser;
|
||||
},
|
||||
hasSubmittedApplicationUser() {
|
||||
const submittedState = window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE);
|
||||
const submittedState = window.sessionStorage.getItem(
|
||||
sessionStorageKeyConstants.SUBMITTED_STATE
|
||||
);
|
||||
return submittedState !== null && submittedState.applicationUser !== null;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ import { shouldStripPromoQueryString } from "@/helpers/promotions-helper";
|
|||
import bailout from "@/layouts/bailout/bailout";
|
||||
import { nextTick } from "vue";
|
||||
import { getBoolFromString } from "@/helpers/boolean-helper";
|
||||
import { sessionStorageKeyConstants } from "../constants/session-storage";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
|
@ -95,10 +94,15 @@ const routes = [
|
|||
log(" --to.query.fmgPage ", to.query?.fmgPage);
|
||||
|
||||
// Intercept all navigation if a submitted order exists in storage
|
||||
if (window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE) !== null) {
|
||||
if (
|
||||
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE) !==
|
||||
null
|
||||
) {
|
||||
if (to.query.fmgPage !== funnelStartPageName) {
|
||||
to.query.fmgPage = fmgPageValues.CONFIRMATION;
|
||||
log(` --has ${sessionStorageKeyConstants.SUBMITTED_STATE} go to confirmation`);
|
||||
log(
|
||||
` --has ${sessionStorageKeyConstants.SUBMITTED_STATE} go to confirmation`
|
||||
);
|
||||
}
|
||||
}
|
||||
// On entering the funnel "fresh", read cookie information, decide what to do next.
|
||||
|
|
|
|||
Loading…
Reference in a new issue