CSR-110: update name of partIndex
This commit is contained in:
parent
bfce98d1e5
commit
517f1d2dea
2 changed files with 10 additions and 10 deletions
|
|
@ -94,7 +94,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
moldingQuestionsData: store.getters.pageData(fmgPageValues.MOLDING_QUESTIONS).partsOrQuestions,
|
moldingQuestionsData: store.getters.pageData(fmgPageValues.MOLDING_QUESTIONS).partsOrQuestions,
|
||||||
selectedAnswers: {},
|
selectedAnswers: {},
|
||||||
currentPartNum: 0,
|
currentGlassIndex: 0,
|
||||||
foundDuplicateQuestions: [],
|
foundDuplicateQuestions: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -119,7 +119,7 @@ export default {
|
||||||
},
|
},
|
||||||
showThisQuestionChain(glass, i) {
|
showThisQuestionChain(glass, i) {
|
||||||
if (glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed
|
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() {
|
async forwardButtonAction() {
|
||||||
const questionAnswersArray = this.moldingQuestionsData.map((glass) => {
|
const questionAnswersArray = this.moldingQuestionsData.map((glass) => {
|
||||||
|
|
@ -403,7 +403,7 @@ export default {
|
||||||
for (let i = answer.glassIndex + 1; i < this.moldingQuestionsData.length; i++) {
|
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 part has not yet been fully answered, then make it the current part
|
||||||
if (!this.moldingQuestionsData[i].answerData?.answerResult) {
|
if (!this.moldingQuestionsData[i].answerData?.answerResult) {
|
||||||
this.currentPartNum = i;
|
this.currentGlassIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -455,8 +455,8 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// advance the currentPartNum
|
// advance the currentGlassIndex
|
||||||
this.currentPartNum = i;
|
this.currentGlassIndex = i;
|
||||||
|
|
||||||
// add answerData to current glass
|
// add answerData to current glass
|
||||||
glass.answerData = {
|
glass.answerData = {
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
partsQuestionsData: store.getters.pageData(fmgPageValues.PART_QUESTIONS).partsOrQuestions,
|
partsQuestionsData: store.getters.pageData(fmgPageValues.PART_QUESTIONS).partsOrQuestions,
|
||||||
selectedAnswers: {},
|
selectedAnswers: {},
|
||||||
currentPartNum: 0,
|
currentGlassIndex: 0,
|
||||||
foundDuplicateQuestions: [],
|
foundDuplicateQuestions: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -119,7 +119,7 @@ export default {
|
||||||
},
|
},
|
||||||
showThisQuestionChain(glass, i) {
|
showThisQuestionChain(glass, i) {
|
||||||
if (!glass.questions || glass.questions?.length < 1 || glass.isSuppressedPart) { return false; } // return false if no questions or if suppressed
|
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() {
|
async forwardButtonAction() {
|
||||||
const questionAnswersArray = this.partsQuestionsData.map((glass) => {
|
const questionAnswersArray = this.partsQuestionsData.map((glass) => {
|
||||||
|
|
@ -399,7 +399,7 @@ export default {
|
||||||
for (let i = answer.glassIndex + 1; i < this.partsQuestionsData.length; i++) {
|
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 part has not yet been fully answered, then make it the current part
|
||||||
if (!this.partsQuestionsData[i].answerData?.answerResult) {
|
if (!this.partsQuestionsData[i].answerData?.answerResult) {
|
||||||
this.currentPartNum = i;
|
this.currentGlassIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -451,8 +451,8 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// advance the currentPartNum
|
// advance the currentGlassIndex
|
||||||
this.currentPartNum = i;
|
this.currentGlassIndex = i;
|
||||||
|
|
||||||
// add answerData to current glass
|
// add answerData to current glass
|
||||||
glass.answerData = {
|
glass.answerData = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue