diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 1ce415ef..643b8e03 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2637,6 +2637,7 @@ export const useTrestle = () => { const construction = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex).construction let isEaveBar = construction.setupCover let isSnowGuard = construction.setupSnowCover + let cvrLmtRow = construction.cvrLmtRow let { rackYn, cvrPlvrYn, moduleIntvlHor, moduleIntvlVer, rackQty, lessSupFitQty } = surface.trestleDetail let result = [] if (rackYn === 'N') { @@ -2678,6 +2679,7 @@ export const useTrestle = () => { } // 모듈 하면,최하면 등 구해야함 modules.forEach((module, index) => { + const level = module.level // 해당 모듈 주변에 다른 모듈이 있는지 확인 let { bottomModule, @@ -2735,10 +2737,12 @@ export const useTrestle = () => { } if (cvrPlvrYn === 'Y') { - moduleRowResultData.eavesHalfCnt++ - if (bottomLeftModule || bottomRightModule || halfBottomLeftModule || halfBottomRightModule) { - //처마커버 한개 노출 추가 - moduleRowResultData.exposedSideEavesCnt++ + if (level <= cvrLmtRow) { + moduleRowResultData.eavesHalfCnt++ + if (bottomLeftModule || bottomRightModule || halfBottomLeftModule || halfBottomRightModule) { + //처마커버 한개 노출 추가 + moduleRowResultData.exposedSideEavesCnt++ + } } } } else { @@ -2747,13 +2751,15 @@ export const useTrestle = () => { moduleRowResultData.exposedBottomBracketCnt += rackQty } if (isEaveBar) { - moduleRowResultData.eavesCnt++ - if ((rightModule && !leftModule) || (!rightModule && leftModule)) { - // 둘중 하나가 없는경우는 처마커버 노출 추가 - moduleRowResultData.exposedSideEavesCnt++ - } else if (!rightModule && !leftModule) { - // 양쪽 둘다 없는경우는 처마커버 노출 2개 추가 - moduleRowResultData.exposedSideEavesCnt += 2 + if (level <= cvrLmtRow) { + moduleRowResultData.eavesCnt++ + if ((rightModule && !leftModule) || (!rightModule && leftModule)) { + // 둘중 하나가 없는경우는 처마커버 노출 추가 + moduleRowResultData.exposedSideEavesCnt++ + } else if (!rightModule && !leftModule) { + // 양쪽 둘다 없는경우는 처마커버 노출 2개 추가 + moduleRowResultData.exposedSideEavesCnt += 2 + } } } }