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:
CarlNation 2025-01-03 13:44:56 -05:00
parent b593d921cc
commit 43933480b5
3 changed files with 11 additions and 3 deletions

View file

@ -202,6 +202,9 @@ describe("payment.vue", () => {
jobMaxMinutes: "45",
},
},
applicationUser: {
loggingOption: false,
},
policy: {
currentDeductible: 1,
},

View file

@ -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;

View file

@ -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);
}