naibagte forward
This commit is contained in:
parent
62fbdd916b
commit
0402cc720f
1 changed files with 10 additions and 16 deletions
|
|
@ -33,16 +33,12 @@ import funnelFooter from "@/common-components/funnel-footer/funnel-footer";
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import {
|
import {fetchCmsContentForPage} from "@/helpers/cms-content-helper";
|
||||||
fetchCmsContentForPage
|
import {settleAllPromises} from "@/helpers/layout-helper";
|
||||||
} from "@/helpers/cms-content-helper";
|
import {fmgPageValues} from "@/router/router-constants/fmgPage-values";
|
||||||
import {
|
import {storeMutations} from "@/constants/store-mutations";
|
||||||
settleAllPromises
|
|
||||||
} from "@/helpers/layout-helper";
|
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import {
|
|
||||||
fmgPageValues
|
|
||||||
} from "@/router/router-constants/fmgPage-values";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "vehicle-parts",
|
name: "vehicle-parts",
|
||||||
|
|
@ -154,13 +150,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
forwardButtonAction() {
|
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 selectedGlassPartNumbers = [];
|
||||||
const matchedParts = [];
|
const matchedParts = [];
|
||||||
|
|
||||||
|
|
@ -188,6 +177,11 @@ export default {
|
||||||
throw new Error("Could not match any parts to the selected parts");
|
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.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue