Merge pull request #920 from Safelite/bugfix/CSR-1041

CSR-1041: update logic to fix issue
This commit is contained in:
AdamCaouetteSafelite 2023-01-06 10:40:51 -05:00 committed by GitHub
commit b8965869a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -473,35 +473,18 @@ export default {
fmgPageValues.PART_QUESTIONS
);
let currentPartsOrQuestions = null;
const allPartsOrQuestions = [
...(pageDataCapabilityQuestions?.partsOrQuestions || []),
...(pageDataMoldingQuestions?.partsOrQuestions || []),
...(pageDataVehicleParts?.partsOrQuestions || []),
...(pageDataPartQuestions?.partsOrQuestions || []),
];
if (
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 hasPartQuestions = this.hasPartQuestions(allPartsOrQuestions);
const hasGlassLocationWithMultipleParts =
this.hasGlassLocationWithMultipleParts(currentPartsOrQuestions);
const hasChildPartQuestions = this.hasChildPartQuestions(currentPartsOrQuestions);
const hasCapabilityQuestions = this.hasCapabilityQuestions(currentPartsOrQuestions);
this.hasGlassLocationWithMultipleParts(allPartsOrQuestions);
const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions);
const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions);
const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
const vin = self.$store.getters.vehicle.vin;