naibagte forward

This commit is contained in:
FrankRua 2022-02-28 10:25:06 -05:00
parent 62fbdd916b
commit 0402cc720f

View file

@ -33,16 +33,12 @@ import funnelFooter from "@/common-components/funnel-footer/funnel-footer";
import alert from "@/ux-components/alert/alert";
// Supporting Files
import {
fetchCmsContentForPage
} from "@/helpers/cms-content-helper";
import {
settleAllPromises
} from "@/helpers/layout-helper";
import {fetchCmsContentForPage} from "@/helpers/cms-content-helper";
import {settleAllPromises} from "@/helpers/layout-helper";
import {fmgPageValues} from "@/router/router-constants/fmgPage-values";
import {storeMutations} from "@/constants/store-mutations";
import store from "@/store";
import {
fmgPageValues
} from "@/router/router-constants/fmgPage-values";
export default {
name: "vehicle-parts",
@ -154,13 +150,6 @@ export default {
},
forwardButtonAction() {
// Temporary solution to prevent the user from going forward if they have not selected anything.
// will be replaced by validation in the future.
if(Object.keys(this.glassParts).length === 0) {
throw new Error("No parts selected");
}
const selectedGlassPartNumbers = [];
const matchedParts = [];
@ -188,6 +177,11 @@ export default {
throw new Error("Could not match any parts to the selected parts");
}
// Save parts to the store.
store.commit(storeMutations.UPDATE_PARTS, matchedParts);
// Navigate to the next page.
}
},