CSR-110: update name of partIndex

This commit is contained in:
Adam Caouette 2022-08-26 12:32:33 -04:00
parent bfce98d1e5
commit 517f1d2dea
2 changed files with 10 additions and 10 deletions

View file

@ -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 = {

View file

@ -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 = {