CSR-1462 break confirmation page out of iframe
This commit is contained in:
parent
90b499424e
commit
702d03f974
3 changed files with 11 additions and 3 deletions
|
|
@ -73,8 +73,6 @@ import { get12HourTimeFormat, get12HourTimeMobileFormat } from "@/helpers/date-h
|
||||||
export default {
|
export default {
|
||||||
name: "confirmation",
|
name: "confirmation",
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER);
|
|
||||||
|
|
||||||
// Call APIs
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$refs.loadingModal.isModalVisible = false;
|
this.$refs.loadingModal.isModalVisible = false;
|
||||||
|
await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER);
|
||||||
this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_SUCCESS, this.$route);
|
this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_SUCCESS, this.$route);
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,16 @@ router.beforeEach(async (to, from, next) => {
|
||||||
showFmgLoadingModal(true);
|
showFmgLoadingModal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
next();
|
const toQueryPage = to.query?.fmgPage;
|
||||||
|
const notToPIAReturn = toQueryPage != "payment-pia-return";
|
||||||
|
const isInIframe = window !== window.top;
|
||||||
|
|
||||||
|
if (isInIframe && notToPIAReturn) {
|
||||||
|
const newUrl = `${window.top.location.origin}${to.href}`;
|
||||||
|
window.top.location.href = newUrl;
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
router.afterEach(async (to, from) => {
|
router.afterEach(async (to, from) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue