diff --git a/src/helpers/recal-helper.js b/src/helpers/recal-helper.js index 8387dbc8..d7d244e0 100644 --- a/src/helpers/recal-helper.js +++ b/src/helpers/recal-helper.js @@ -11,7 +11,7 @@ export function isRecalPartOrHasChildRecalPart(glassPart) { const isGlassPartRecalPart = isRecalPart(glassPart); if (!isGlassPartRecalPart && glassPart.childParts && glassPart.childParts.length > 0) { - return glassPart.childParts.filter((cp) => isRecalPartOrHasChildRecalPart(cp)); + return glassPart.childParts.some((cp) => isRecalPartOrHasChildRecalPart(cp)); } return isGlassPartRecalPart; @@ -64,8 +64,9 @@ export function containsRecalParts(lineItems) { const flattened = [ ...(lineItems.glassParts ?? []), ...(lineItems.supportingItems ?? []), + ...(lineItems.otherParts ?? []), + ...(lineItems.feeItems ?? []), ...(lineItems.vaps ?? []), - ...(lineItems.promos ?? []), ]; return flattened.some((li) => isRecalPartOrHasChildRecalPart(li)); @@ -77,6 +78,6 @@ export function anyPartWithRequiresRecalFlag(lineItems) { return false; } - return lineItems.glassParts?.some((li) => li.requiresRecalibration === true); + return lineItems.some((li) => li.requiresRecalibration === true); } diff --git a/src/layouts/schedule-page/recal-ack-modal/recal-ack-modal.vue b/src/layouts/schedule-page/recal-ack-modal/recal-ack-modal.vue index dee8131e..138594ea 100644 --- a/src/layouts/schedule-page/recal-ack-modal/recal-ack-modal.vue +++ b/src/layouts/schedule-page/recal-ack-modal/recal-ack-modal.vue @@ -1,33 +1,33 @@