CASH-60
CASH-60 remove the async await from the payment page prereqs. Causes a promise to be returned instead of a bool. Moved it to the router instead
This commit is contained in:
parent
b593d921cc
commit
43933480b5
3 changed files with 11 additions and 3 deletions
|
|
@ -202,6 +202,9 @@ describe("payment.vue", () => {
|
||||||
jobMaxMinutes: "45",
|
jobMaxMinutes: "45",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
applicationUser: {
|
||||||
|
loggingOption: false,
|
||||||
|
},
|
||||||
policy: {
|
policy: {
|
||||||
currentDeductible: 1,
|
currentDeductible: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
// Service Location
|
// Service Location
|
||||||
const serviceLocation = store.getters.order.serviceLocation;
|
const serviceLocation = store.getters.order.serviceLocation;
|
||||||
const mobileReqs = !!(
|
const mobileReqs = !!(
|
||||||
|
|
@ -579,8 +579,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!preReqResult) {
|
if (!preReqResult) {
|
||||||
await store.getters.applicationUser.saveSessionPromise;
|
return false;
|
||||||
this.backButtonAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return preReqResult;
|
return preReqResult;
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,12 @@ const routes = [
|
||||||
|
|
||||||
if (!arePagePrerequisitesValid(component)) {
|
if (!arePagePrerequisitesValid(component)) {
|
||||||
console.log("Page prereq error: " + component.default.name);
|
console.log("Page prereq error: " + component.default.name);
|
||||||
|
|
||||||
|
if (to.query.fmgPage === fmgPageValues.PAYMENT) {
|
||||||
|
await store.getters.applicationUser.saveSessionPromise;
|
||||||
|
window.location = applicationConfig.PIA_CANCEL_URL;
|
||||||
|
}
|
||||||
|
|
||||||
GoToFunnelStartOn404(next);
|
GoToFunnelStartOn404(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue