Revert "Add method to get recal parts from glassParts"
This reverts commit 4c115a531b.
This commit is contained in:
parent
4c115a531b
commit
a4436a9a32
1 changed files with 0 additions and 15 deletions
|
|
@ -25,21 +25,6 @@ export function getTopLevelGlassPartsWithRecal(glassParts) {
|
|||
return glassParts.filter((gp) => isRecalPartOrHasChildRecalPart(gp));
|
||||
}
|
||||
|
||||
export function getRecalParts(glassParts) {
|
||||
if (!glassParts) {
|
||||
return null;
|
||||
}
|
||||
return glassParts.flatMap((gp) => {
|
||||
if (isRecalPart(gp)) {
|
||||
return [gp];
|
||||
}
|
||||
if (gp.childParts && gp.childParts.length > 0) {
|
||||
return gp.childParts.filter((cp) => isRecalPart(cp));
|
||||
}
|
||||
return [];
|
||||
});
|
||||
}
|
||||
|
||||
export function getItemsWithoutRecalParts(lineItemsArray) {
|
||||
if (!lineItemsArray || !Array.isArray(lineItemsArray)) return null;
|
||||
const firstLevelFiltered = deepClone(lineItemsArray).filter((li) => !isRecalPart(li));
|
||||
|
|
|
|||
Loading…
Reference in a new issue