CSR-108: few more refactors
This commit is contained in:
parent
43c95a81a3
commit
933eb88ecc
1 changed files with 9 additions and 11 deletions
|
|
@ -82,7 +82,6 @@ export default {
|
|||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
// this.partsQuestionsData = resultMap.partsOrQuestionsInitialData;
|
||||
});
|
||||
},
|
||||
data() {
|
||||
|
|
@ -121,7 +120,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
showThisPartQuestionChain(part, i) {
|
||||
if (part.partQuestions?.length < 1) { return false; }
|
||||
if (part.partQuestions?.length < 1) { return false; } // return false if only one partQuestion
|
||||
if (this.currentPartNum === i || part.answerData?.answerResult.length > 0) { return true; }
|
||||
return false;
|
||||
},
|
||||
|
|
@ -151,9 +150,7 @@ export default {
|
|||
this.$refs.funnelFooter.removeLoader();
|
||||
});
|
||||
|
||||
if (!partsLookup) {
|
||||
return;
|
||||
}
|
||||
if (!partsLookup) { return }
|
||||
|
||||
this.glassNameAndParts = partsLookup.data.glassNameAndParts;
|
||||
|
||||
|
|
@ -164,13 +161,14 @@ export default {
|
|||
const collectedGlassParts = [];
|
||||
this.glassNameAndParts.forEach((glass) => {
|
||||
if (Array.isArray(glass.parts) && glass.parts.length === 1) {
|
||||
const singlePart = glass.parts[0];
|
||||
collectedGlassParts.push({
|
||||
"partNumber": glass.parts[0].partNumber,
|
||||
"description": glass.parts[0].description,
|
||||
"color": glass.parts[0].color,
|
||||
"requiresRecalibration": glass.parts[0].requiresRecalibration,
|
||||
"childParts": glass.parts[0].childParts,
|
||||
"price": glass.parts[0].price,
|
||||
"partNumber": singlePart.partNumber,
|
||||
"description": singlePart.description,
|
||||
"color": singlePart.color,
|
||||
"requiresRecalibration": singlePart.requiresRecalibration,
|
||||
"childParts": singlePart.childParts,
|
||||
"price": singlePart.price,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue