CSR-1852 updated to use page constants

This commit is contained in:
Matt Caimi 2023-12-28 16:49:54 -05:00
parent 44a6218328
commit 393ce3df4d

View file

@ -171,12 +171,13 @@ router.beforeEach(async (to, from, next) => {
}
const toQueryPage = to.query?.fmgPage;
const notToPIAReturn = toQueryPage != "payment-pia-return";
const notToPIAReturn = toQueryPage != fmgPageValues.PAYMENT_PIA_RETURN;
const isInIframe = window !== window.top;
// fromPaymentToConfirmation workaround for navigating from an iframe but
// isInIframe evaluates to false for some reason when navigating from payment to confirmation
const fromPaymentToConfirmation = fromQueryPage === "payment" && toQueryPage === "confirmation";
const fromPaymentToConfirmation =
fromQueryPage === fmgPageValues.PAYMENT && toQueryPage === fmgPageValues.CONFIRMATION;
if ((isInIframe && notToPIAReturn) || fromPaymentToConfirmation) {
const newUrl = `${window.top.location.origin}${to.href}`;