CASH-126
CASH-126 prevent back from safeliteHop pages from navigating to return-user. also turn prettier back on for pipeline
This commit is contained in:
parent
773c4cf6fc
commit
a8e6dfa9c3
4 changed files with 17 additions and 14 deletions
|
|
@ -37,15 +37,15 @@ variables:
|
||||||
stages:
|
stages:
|
||||||
# PR's
|
# PR's
|
||||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
# - stage: TestFormat
|
- stage: TestFormat
|
||||||
# displayName: Test Code Format
|
displayName: Test Code Format
|
||||||
# jobs:
|
jobs:
|
||||||
# - job: checkFormatting
|
- job: checkFormatting
|
||||||
# displayName: Check formatting
|
displayName: Check formatting
|
||||||
# container: prettier-node
|
container: prettier-node
|
||||||
# steps:
|
steps:
|
||||||
# - bash: prettier --check "$(Build.SourcesDirectory)/src/**/*.(js|vue)"
|
- bash: prettier --check "$(Build.SourcesDirectory)/src/**/*.(js|vue)"
|
||||||
# displayName: Run Prettier check
|
displayName: Run Prettier check
|
||||||
|
|
||||||
- stage: TestPr
|
- stage: TestPr
|
||||||
displayName: Run Unit Tests For PullRequest
|
displayName: Run Unit Tests For PullRequest
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getColCount() {
|
getColCount() {
|
||||||
if(this.packageNumber > 2) {
|
if (this.packageNumber > 2) {
|
||||||
return "col-xl-8";
|
return "col-xl-8";
|
||||||
} else {
|
} else {
|
||||||
return "col-xl-6";
|
return "col-xl-6";
|
||||||
|
|
|
||||||
|
|
@ -152,10 +152,10 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin: 1rem .5rem 0 0;
|
margin: 1rem 0.5rem 0 0;
|
||||||
}
|
}
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin: 1rem 0 0 .5rem;
|
margin: 1rem 0 0 0.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ const routes = [
|
||||||
|
|
||||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||||
const fromReturnUser = from?.name === fmgPageValues.RETURN_USER;
|
const fromReturnUser = from?.name === fmgPageValues.RETURN_USER;
|
||||||
|
const toPaymentPage = to.query.fmgPage?.startsWith("payment");
|
||||||
|
|
||||||
// Intercept all navigation if a submitted order exists in storage
|
// Intercept all navigation if a submitted order exists in storage
|
||||||
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
||||||
|
|
@ -93,12 +94,14 @@ const routes = [
|
||||||
// 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.
|
||||||
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
||||||
// if entering the funnel from non-funnel check and see if there is already a funnel cookie.
|
// if entering the funnel from non-funnel check and see if there is already a funnel cookie.
|
||||||
// if so, send them to return-user page
|
// if so, send them to return-user page. this is catching navigation from an external page.
|
||||||
|
// safeliteHop(payment) cancel or clicking back also trigger it so exclude payment.
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||||
if (
|
if (
|
||||||
to?.query?.fmgPage !== fmgPageValues.RETURN_USER &&
|
to?.query?.fmgPage !== fmgPageValues.RETURN_USER &&
|
||||||
!fromReturnUser &&
|
!fromReturnUser &&
|
||||||
!fromHeritage &&
|
!fromHeritage &&
|
||||||
|
!toPaymentPage &&
|
||||||
funnelCookieLastTouched !== null &&
|
funnelCookieLastTouched !== null &&
|
||||||
funnelCookieLastTouched !== undefined
|
funnelCookieLastTouched !== undefined
|
||||||
) {
|
) {
|
||||||
|
|
@ -115,7 +118,7 @@ const routes = [
|
||||||
log(" --clear promise");
|
log(" --clear promise");
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||||
|
|
||||||
if (!to.query.fmgPage?.startsWith("payment")) {
|
if (!toPaymentPage) {
|
||||||
//payment pages used to return from safelitehop so exclude here
|
//payment pages used to return from safelitehop so exclude here
|
||||||
// Remove the parameter after quote release
|
// Remove the parameter after quote release
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue