diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index daf0977a..9e263a2c 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -233,7 +233,6 @@ export default function CircuitTrestleSetting({ id }) { ...getOptYn(), useModuleItemList: getUseModuleItemList(), roofSurfaceList: getRoofSurfaceList().map((surface) => { - console.log(surface.moduleList) return { ...surface, moduleList: surface.moduleList.map((module) => { diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index c4e456a9..20e8b4ac 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -54,16 +54,20 @@ export const useTrestle = () => { let isSnowGuard = construction.setupSnowCover const direction = parent.direction const rack = surface.trestleDetail.rack - let { rackQty, rackIntvlPct, rackYn, cvrPlvrYn } = surface.trestleDetail + let { rackQty, rackIntvlPct, rackYn, cvrPlvrYn, lessSupFitIntvlPct, lessSupFitQty } = surface.trestleDetail - if (!rack) { + if (!rack && lessSupFitIntvlPct === 0 && lessSupFitQty === 0) { //25/02/06 가대없음의 경우 랙정보가 없음 return } - const rackInfos = Object.keys(rack).map((key) => { - return { key, value: rack[key] } - }) + let rackInfos = [] + + if (rack) { + rackInfos = Object.keys(rack).map((key) => { + return { key, value: rack[key] } + }) + } const result = calculateForApi(surface) @@ -1318,9 +1322,9 @@ export const useTrestle = () => { //랙 없음 인 경우 지지금구 설치 const installBracketWithOutRack = (surface, exposedBottomModules, leftExposedHalfBottomModules, rightExposedHalfBottomPoints, isChidory) => { let { rackQty, rackIntvlPct, moduleIntvlHor, moduleIntvlVer, lessSupFitQty, lessSupFitIntvlPct } = surface.trestleDetail + rackQty = lessSupFitQty + rackIntvlPct = lessSupFitIntvlPct const direction = surface.direction - rackQty = 3 - rackIntvlPct = 10 canvas.renderAll() exposedBottomModules.forEach((module) => { @@ -1472,13 +1476,13 @@ export const useTrestle = () => { canvas.add(bracket) canvas.renderAll() if (direction === 'south') { - startPointY -= height + moduleIntvlVer + startPointY -= height } else if (direction === 'north') { - startPointY += height + moduleIntvlVer + startPointY += height } else if (direction === 'east') { - startPointX -= width + moduleIntvlHor + startPointX -= width } else if (direction === 'west') { - startPointX += width + moduleIntvlHor + startPointX += width } } }