Merge pull request #920 from Safelite/bugfix/CSR-1041
CSR-1041: update logic to fix issue
This commit is contained in:
commit
b8965869a5
1 changed files with 10 additions and 27 deletions
|
|
@ -473,35 +473,18 @@ export default {
|
||||||
fmgPageValues.PART_QUESTIONS
|
fmgPageValues.PART_QUESTIONS
|
||||||
);
|
);
|
||||||
|
|
||||||
let currentPartsOrQuestions = null;
|
const allPartsOrQuestions = [
|
||||||
|
...(pageDataCapabilityQuestions?.partsOrQuestions || []),
|
||||||
|
...(pageDataMoldingQuestions?.partsOrQuestions || []),
|
||||||
|
...(pageDataVehicleParts?.partsOrQuestions || []),
|
||||||
|
...(pageDataPartQuestions?.partsOrQuestions || []),
|
||||||
|
];
|
||||||
|
|
||||||
if (
|
const hasPartQuestions = this.hasPartQuestions(allPartsOrQuestions);
|
||||||
this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) &&
|
|
||||||
!!pageDataCapabilityQuestions
|
|
||||||
) {
|
|
||||||
currentPartsOrQuestions = pageDataCapabilityQuestions?.partsOrQuestions;
|
|
||||||
} else if (
|
|
||||||
this.currentPageComesAfterPage(currentPage, fmgPageValues.MOLDING_QUESTIONS) &&
|
|
||||||
!!pageDataMoldingQuestions
|
|
||||||
) {
|
|
||||||
currentPartsOrQuestions = pageDataMoldingQuestions?.partsOrQuestions;
|
|
||||||
} else if (
|
|
||||||
this.currentPageComesAfterPage(currentPage, fmgPageValues.VEHICLE_PARTS) &&
|
|
||||||
!!pageDataVehicleParts
|
|
||||||
) {
|
|
||||||
currentPartsOrQuestions = pageDataVehicleParts?.partsOrQuestions;
|
|
||||||
} else if (
|
|
||||||
this.currentPageComesAfterPage(currentPage, fmgPageValues.PARTS_QUESTIONS) &&
|
|
||||||
!!pageDataPartQuestions
|
|
||||||
) {
|
|
||||||
currentPartsOrQuestions = pageDataPartQuestions?.partsOrQuestions;
|
|
||||||
}
|
|
||||||
|
|
||||||
const hasPartQuestions = this.hasPartQuestions(currentPartsOrQuestions);
|
|
||||||
const hasGlassLocationWithMultipleParts =
|
const hasGlassLocationWithMultipleParts =
|
||||||
this.hasGlassLocationWithMultipleParts(currentPartsOrQuestions);
|
this.hasGlassLocationWithMultipleParts(allPartsOrQuestions);
|
||||||
const hasChildPartQuestions = this.hasChildPartQuestions(currentPartsOrQuestions);
|
const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions);
|
||||||
const hasCapabilityQuestions = this.hasCapabilityQuestions(currentPartsOrQuestions);
|
const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions);
|
||||||
const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
||||||
|
|
||||||
const vin = self.$store.getters.vehicle.vin;
|
const vin = self.$store.getters.vehicle.vin;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue