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",
|
||||
},
|
||||
},
|
||||
applicationUser: {
|
||||
loggingOption: false,
|
||||
},
|
||||
policy: {
|
||||
currentDeductible: 1,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
async arePagePrerequisitesValid() {
|
||||
arePagePrerequisitesValid() {
|
||||
// Service Location
|
||||
const serviceLocation = store.getters.order.serviceLocation;
|
||||
const mobileReqs = !!(
|
||||
|
|
@ -579,8 +579,7 @@ export default {
|
|||
}
|
||||
|
||||
if (!preReqResult) {
|
||||
await store.getters.applicationUser.saveSessionPromise;
|
||||
this.backButtonAction();
|
||||
return false;
|
||||
}
|
||||
|
||||
return preReqResult;
|
||||
|
|
|
|||
|
|
@ -194,6 +194,12 @@ const routes = [
|
|||
|
||||
if (!arePagePrerequisitesValid(component)) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue