CSR-1072 send verified insurance to vehicle-damage on page error
This commit is contained in:
CarlNation 2024-02-29 09:55:49 -05:00
parent 9838b231d3
commit 4a03629754

View file

@ -451,6 +451,11 @@ async function DisplayPageError() {
// we use the pageError querystring as a counter to how many times a user has experienced an error and been routed here.
// once they receive more than 1 pageerrors, we'll reset their state to hopefully correct any issues they may be having.
var navPage = fmgPageValues.VEHICLE;
if (store.getters.payment.insuranceCoverage.isVerified) {
navPage = fmgPageValues.VEHICLE_DAMAGE;
}
if (pageError) {
var errorCount = Number(pageError);
if (errorCount > 1) {
@ -459,19 +464,19 @@ async function DisplayPageError() {
router.push({
path: "/",
query: { fmgPage: "vehicle" },
query: { fmgPage: navPage },
});
} else {
errorCount++;
router.push({
path: "/",
query: { fmgPage: "vehicle", pageError: errorCount },
query: { fmgPage: navPage, pageError: errorCount },
});
}
} else {
router.push({
path: "/",
query: { fmgPage: "vehicle", pageError: "1" },
query: { fmgPage: navPage, pageError: "1" },
});
}
}