roofConstruction -> roofConstructions 수정

This commit is contained in:
김민식 2025-04-23 11:11:53 +09:00
parent 6d310a6a32
commit 7ff0178b19
2 changed files with 7 additions and 8 deletions

View File

@ -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()
}),
]

View File

@ -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)
}