From 7ff0178b198475d3e08d2e88a6a09c691a5a3009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:11:53 +0900 Subject: [PATCH] =?UTF-8?q?roofConstruction=20->=20roofConstructions=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/components/floor-plan/modal/basic/step/Trestle.jsx | 6 +++--- src/hooks/common/useCanvasPopupStatusController.js | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/floor-plan/modal/basic/step/Trestle.jsx b/src/components/floor-plan/modal/basic/step/Trestle.jsx index 3c500444..2e71dcfa 100644 --- a/src/components/floor-plan/modal/basic/step/Trestle.jsx +++ b/src/components/floor-plan/modal/basic/step/Trestle.jsx @@ -452,7 +452,7 @@ const Trestle = forwardRef((props, ref) => { }), new Promise((resolve) => { - const roofConstruction = newAddedRoofs.map((roof, index) => ({ + const roofConstructions = newAddedRoofs.map((roof, index) => ({ roofIndex: newRoofs[index].index, addRoof: newRoofs[index], trestle: { @@ -468,9 +468,9 @@ const Trestle = forwardRef((props, ref) => { trestleDetail: roof.trestleDetail, })) trestleTrigger({ - roofConstruction, + roofConstructions, }) - setRoofsStore(roofConstruction) + setRoofsStore(roofConstructions) resolve() }), ] diff --git a/src/hooks/common/useCanvasPopupStatusController.js b/src/hooks/common/useCanvasPopupStatusController.js index 9b4e5a5d..249a8563 100644 --- a/src/hooks/common/useCanvasPopupStatusController.js +++ b/src/hooks/common/useCanvasPopupStatusController.js @@ -76,16 +76,15 @@ export function useCanvasPopupStatusController(param = 1) { roofSurfaceList.forEach((surface) => { surface.modules = modules.filter((module) => module.surfaceId === surface.id) }) - if (data.roofConstruction) { - setRoofs(data.roofConstruction) - setManagementState({ ...managementState, roofs: data.roofConstruction.map((roof) => roof.construction.managementState) }) + if (data.roofConstructions) { + setRoofs(data.roofConstructions) + setManagementState({ ...managementState, roofs: data.roofConstructions.map((roof) => roof.construction.managementState) }) // setModuleSelectionDataStore({ ...moduleSelectionDataStore, roofConstructions: data.roofConstruction }) - resultData = { ...resultData, ...data } + resultData = { ...resultData, roofConstructions: data.roofConstructions } } // if (data?.module) setManagementState(data.common.managementState) } } - console.log('resultData', resultData) setModuleSelectionDataStore(resultData) }