24 lines
970 B
JavaScript
24 lines
970 B
JavaScript
import { storeActions } from "@/constants/store-actions.js";
|
|
import store from "@/store";
|
|
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
|
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
|
|
|
export default {
|
|
methods: {
|
|
async navigateForwardWithSingleCarMatch() {
|
|
const pageName = this.$options?.name;
|
|
|
|
// If we have not already saved a session, we need to save one now before the lengthy call to getPartsOrQuestions
|
|
if (!store.getters.applicationUser.savedSessionId) {
|
|
await saveSession({ pageNameToLog: pageName });
|
|
}
|
|
|
|
const result = await this.dispatchStoreAction(storeActions.GET_PARTS_OR_QUESTIONS, {
|
|
pageNameToLog: pageName,
|
|
});
|
|
const partsOrQuestions = result.data.partsOrQuestions;
|
|
|
|
vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this);
|
|
},
|
|
},
|
|
};
|