CASH-462 | Prettier changes

This commit is contained in:
Scott Kiener 2025-04-03 14:17:31 -04:00
parent 43d1353e52
commit af9775aa3b
3 changed files with 22 additions and 10 deletions

View file

@ -1,3 +1,3 @@
export const sessionStorageKeyConstants = { export const sessionStorageKeyConstants = {
SUBMITTED_STATE: "submittedState" SUBMITTED_STATE: "submittedState",
} };

View file

@ -199,17 +199,25 @@ export default {
} }
}, },
getSubmittedOrder() { getSubmittedOrder() {
return JSON.parse(window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE))?.order; return JSON.parse(
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE)
)?.order;
}, },
hasSubmittedOrder() { hasSubmittedOrder() {
const submittedState = window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE); const submittedState = window.sessionStorage.getItem(
sessionStorageKeyConstants.SUBMITTED_STATE
);
return submittedState !== null && submittedState.order !== null; return submittedState !== null && submittedState.order !== null;
}, },
getSubmittedApplicationUser() { getSubmittedApplicationUser() {
return JSON.parse(window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE))?.applicationUser; return JSON.parse(
window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE)
)?.applicationUser;
}, },
hasSubmittedApplicationUser() { hasSubmittedApplicationUser() {
const submittedState = window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE); const submittedState = window.sessionStorage.getItem(
sessionStorageKeyConstants.SUBMITTED_STATE
);
return submittedState !== null && submittedState.applicationUser !== null; return submittedState !== null && submittedState.applicationUser !== null;
}, },
}, },

View file

@ -40,7 +40,6 @@ import { shouldStripPromoQueryString } from "@/helpers/promotions-helper";
import bailout from "@/layouts/bailout/bailout"; import bailout from "@/layouts/bailout/bailout";
import { nextTick } from "vue"; import { nextTick } from "vue";
import { getBoolFromString } from "@/helpers/boolean-helper"; import { getBoolFromString } from "@/helpers/boolean-helper";
import { sessionStorageKeyConstants } from "../constants/session-storage";
const routes = [ const routes = [
{ {
@ -95,10 +94,15 @@ const routes = [
log(" --to.query.fmgPage ", to.query?.fmgPage); log(" --to.query.fmgPage ", to.query?.fmgPage);
// Intercept all navigation if a submitted order exists in storage // 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) { if (to.query.fmgPage !== funnelStartPageName) {
to.query.fmgPage = fmgPageValues.CONFIRMATION; 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. // On entering the funnel "fresh", read cookie information, decide what to do next.