모듈설치면에 가대 상세 데이터 추가
This commit is contained in:
parent
5ac8d7af20
commit
94fd0f0221
@ -12,6 +12,10 @@ export function useModulePlace() {
|
||||
const selectedModules = useRecoilValue(selectedModuleState)
|
||||
const { getTrestleDetailList } = useMasterController()
|
||||
|
||||
useEffect(() => {
|
||||
console.log('🚀 ~ useModulePlace ~ moduleSelectionData:', moduleSelectionData)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const common = moduleSelectionData.common
|
||||
const roofConstructions = moduleSelectionData.roofConstructions
|
||||
@ -56,11 +60,17 @@ export function useModulePlace() {
|
||||
.forEach((roof) => {
|
||||
const roofIndex = roof.roofMaterial.index //지붕의 지붕재의 순번
|
||||
trestleDetailList.forEach((detail) => {
|
||||
console.log('detail', detail)
|
||||
console.log('roofIndex', roofIndex)
|
||||
console.log('detail.data.roofIndex', detail.data.roofIndex)
|
||||
if (Number(detail.data.roofIndex) === roofIndex) {
|
||||
//roof에 상세 데이터 추가
|
||||
roof.set({ trestleDetail: detail.data })
|
||||
|
||||
//surface에 상세 데이터 추가
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((surface) => surface.name === 'moduleSetupSurface' && surface.parentId === roof.id)
|
||||
.forEach((surface) => {
|
||||
surface.set({ trestleDetail: detail.data })
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user