CSR-803: refactoring for readability
This commit is contained in:
parent
8ce4ce15c7
commit
326429657c
1 changed files with 11 additions and 10 deletions
|
|
@ -472,16 +472,17 @@ export default {
|
||||||
fmgPageValues.PART_QUESTIONS
|
fmgPageValues.PART_QUESTIONS
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentPartsOrQuestions = (
|
let currentPartsOrQuestions = null;
|
||||||
(currentPage !== fmgPageValues.CAPABILITY_QUESTIONS
|
|
||||||
? pageDataCapabilityQuestions
|
if (currentPage !== fmgPageValues.CAPABILITY_QUESTIONS && !!pageDataCapabilityQuestions) {
|
||||||
: null) ??
|
currentPartsOrQuestions = pageDataCapabilityQuestions?.partsOrQuestions;
|
||||||
(currentPage !== fmgPageValues.MOLDING_QUESTIONS
|
} else if (currentPage !== fmgPageValues.MOLDING_QUESTIONS && !!pageDataMoldingQuestions) {
|
||||||
? pageDataMoldingQuestions
|
currentPartsOrQuestions = pageDataMoldingQuestions?.partsOrQuestions;
|
||||||
: null) ??
|
} else if (currentPage !== fmgPageValues.VEHICLE_PARTS && !!pageDataVehicleParts) {
|
||||||
(currentPage !== fmgPageValues.VEHICLE_PARTS ? pageDataVehicleParts : null) ??
|
currentPartsOrQuestions = pageDataVehicleParts?.partsOrQuestions;
|
||||||
(currentPage !== fmgPageValues.PARTS_QUESTIONS ? pageDataPartQuestions : null)
|
} else if (currentPage !== fmgPageValues.PARTS_QUESTIONS && !!pageDataPartQuestions) {
|
||||||
)?.partsOrQuestions;
|
currentPartsOrQuestions = pageDataPartQuestions?.partsOrQuestions;
|
||||||
|
}
|
||||||
|
|
||||||
const hasPartQuestions = this.hasPartQuestions(currentPartsOrQuestions);
|
const hasPartQuestions = this.hasPartQuestions(currentPartsOrQuestions);
|
||||||
const hasGlassLocationWithMultipleParts =
|
const hasGlassLocationWithMultipleParts =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue