diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index f2bf68c68..ed7e54307 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -94,7 +94,7 @@ export default { return { moldingQuestionsData: store.getters.pageData(fmgPageValues.MOLDING_QUESTIONS).partsOrQuestions, selectedAnswers: {}, - currentPartNum: 0, + currentGlassIndex: 0, foundDuplicateQuestions: [], }; }, @@ -119,7 +119,7 @@ export default { }, showThisQuestionChain(glass, i) { if (glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed - return this.currentPartNum === i || glass.answerData?.answerResult?.length > 0; + return this.currentGlassIndex === i || glass.answerData?.answerResult?.length > 0; }, async forwardButtonAction() { const questionAnswersArray = this.moldingQuestionsData.map((glass) => { @@ -403,7 +403,7 @@ export default { for (let i = answer.glassIndex + 1; i < this.moldingQuestionsData.length; i++) { // if this part has not yet been fully answered, then make it the current part if (!this.moldingQuestionsData[i].answerData?.answerResult) { - this.currentPartNum = i; + this.currentGlassIndex = i; break; } } @@ -455,8 +455,8 @@ export default { } }); - // advance the currentPartNum - this.currentPartNum = i; + // advance the currentGlassIndex + this.currentGlassIndex = i; // add answerData to current glass glass.answerData = { diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 572a03cca..9b3e8d144 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -93,7 +93,7 @@ export default { return { partsQuestionsData: store.getters.pageData(fmgPageValues.PART_QUESTIONS).partsOrQuestions, selectedAnswers: {}, - currentPartNum: 0, + currentGlassIndex: 0, foundDuplicateQuestions: [], }; }, @@ -119,7 +119,7 @@ export default { }, showThisQuestionChain(glass, i) { if (!glass.questions || glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed - return this.currentPartNum === i || glass.answerData?.answerResult?.length > 0; + return this.currentGlassIndex === i || glass.answerData?.answerResult?.length > 0; }, async forwardButtonAction() { const questionAnswersArray = this.partsQuestionsData.map((glass) => { @@ -399,7 +399,7 @@ export default { for (let i = answer.glassIndex + 1; i < this.partsQuestionsData.length; i++) { // if this part has not yet been fully answered, then make it the current part if (!this.partsQuestionsData[i].answerData?.answerResult) { - this.currentPartNum = i; + this.currentGlassIndex = i; break; } } @@ -451,8 +451,8 @@ export default { } }); - // advance the currentPartNum - this.currentPartNum = i; + // advance the currentGlassIndex + this.currentGlassIndex = i; // add answerData to current glass glass.answerData = {