From 9c519de9b575a742be2f4a9457c858c9714ee3a9 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 12 Feb 2025 11:05:17 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=ED=95=98=EC=A0=9C=EB=B9=84=EC=B9=98=20?= =?UTF-8?q?=EC=86=8C=EC=88=98=EC=A0=90=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index a9289861..86e744fa 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2076,7 +2076,7 @@ export const useTrestle = () => { mixMatlNo: module.mixMatlNo, raftBaseCd: addRoof.raft, inclCd: addRoof.pitch, - roofPitch: addRoof.roofPchBase, + roofPitch: !addRoof.roofPchBase ? addRoof.roofPchBase : Number(addRoof.roofPchBase), exposedLowerBottomTotCnt: result.exposedBottom, // 노출 최하면 갯수 exposedHalfBottomTotCnt: result.exposedHalfBottom, // 노출 반하면 갯수 exposedTopTotCnt: result.exposedTop, // 노출 상면 총 수 From 4b032782e4017eac6c40a488a205125190696ae3 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Wed, 12 Feb 2025 11:09:55 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EB=A9=80=ED=8B=B0=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=EC=9D=BC=EC=8B=9C=20=EC=B2=98=EB=A7=88=EB=A9=B4=20=EC=99=B8?= =?UTF-8?q?=EC=97=90=20=EC=84=A0=ED=83=9D=20=EB=B6=88=EA=B0=80=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/modal/basic/step/Placement.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/floor-plan/modal/basic/step/Placement.jsx b/src/components/floor-plan/modal/basic/step/Placement.jsx index 4eeeab0a..e8d8048f 100644 --- a/src/components/floor-plan/modal/basic/step/Placement.jsx +++ b/src/components/floor-plan/modal/basic/step/Placement.jsx @@ -21,6 +21,8 @@ const Placement = forwardRef((props, refs) => { const moduleSelectionData = useRecoilValue(moduleSelectionDataState) const { makeModuleInitArea } = useModuleBasicSetting(3) + const [isMultiModule, setIsMultiModule] = useState(false) + //모듈 배치면 생성 useEffect(() => { if (moduleSelectionData) { @@ -49,6 +51,11 @@ const Placement = forwardRef((props, refs) => { setSelectedItems(initCheckedModule) setSelectedModules(moduleSelectionData.module) } + + //모듈 배치면 생성 + if (moduleSelectionData.module.itemList.length > 1) { + setIsMultiModule(true) + } } }, [moduleSelectionData]) @@ -190,6 +197,7 @@ const Placement = forwardRef((props, refs) => { checked={setupLocation === 'center'} value={'center'} onChange={handleSetupLocation} + disabled={isMultiModule} /> @@ -212,6 +220,7 @@ const Placement = forwardRef((props, refs) => { checked={setupLocation === 'ridge'} value={'ridge'} onChange={handleSetupLocation} + disabled={isMultiModule} /> From d9fb243d14e21e9d8b62dfee8601a08c020358f0 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 12 Feb 2025 11:24:43 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 86e744fa..61198ad4 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2443,25 +2443,25 @@ export const useTrestle = () => { (centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY, ) } - if (leftModule) { + if (!leftModule) { leftPoint = { x: x - width, y: y } leftModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY, ) } - if (rightModule) { + if (!rightModule) { rightPoint = { x: x + width, y: y } rightModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY, ) } - if (bottomLeftModule) { + if (!bottomLeftModule) { bottomLeftPoint = { x: x - width, y: y + h } bottomLeftModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY, ) } - if (bottomRightModule) { + if (!bottomRightModule) { bottomRightPoint = { x: x + width, y: y + h } bottomRightModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY, @@ -2504,25 +2504,25 @@ export const useTrestle = () => { (centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY, ) } - if (leftModule) { + if (!leftModule) { leftPoint = { x: x + width, y: y } leftModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY, ) } - if (rightModule) { + if (!rightModule) { rightPoint = { x: x - width, y: y } rightModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY, ) } - if (bottomLeftModule) { + if (!bottomLeftModule) { bottomLeftPoint = { x: x + width, y: y - h } bottomLeftModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY, ) } - if (bottomRightModule) { + if (!bottomRightModule) { bottomRightPoint = { x: x - width, y: y - h } bottomRightModule = centerPoints.find( (centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY, From a8863dcf842fa1e7861f80459b1411787dee959f Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 12 Feb 2025 11:36:59 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=8Cfix:=20=EC=8B=A0=EA=B7=9C=20?= =?UTF-8?q?=ED=94=8C=EB=9E=9C=20=EC=83=9D=EC=84=B1=EC=8B=9C=20=EB=A9=94?= =?UTF-8?q?=EC=84=B8=EC=A7=80=20=EA=B2=B9=EC=B9=A8=20=ED=98=84=EC=83=81=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePlan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index 7d9bc925..440a6319 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -333,7 +333,7 @@ export function usePlan(params = {}) { */ const handleAddPlan = async (userId, objectNo) => { if (currentCanvasPlan?.id) { - await saveCanvas(true) + await saveCanvas(false) } JSON.parse(currentCanvasData()).objects.length > 0 ? swalFire({