diff --git a/src/app/floor-plan/FloorPlanProvider.js b/src/app/floor-plan/FloorPlanProvider.js
index a9595aa5..d09577f5 100644
--- a/src/app/floor-plan/FloorPlanProvider.js
+++ b/src/app/floor-plan/FloorPlanProvider.js
@@ -1,4 +1,4 @@
-'ues client'
+'use client'
// import { correntObjectNoState } from '@/store/settingAtom'
import { notFound, usePathname, useSearchParams } from 'next/navigation'
diff --git a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
index 87ad753c..a4e9959f 100644
--- a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
+++ b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
@@ -342,82 +342,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
-
- | {getMessage('modal.placement.initial.setting.roof.angle.setting')} |
-
-
- {currentRoof &&
- roofAngleSetArray.map((item, index) => (
-
-
-
- setCurrentRoof({ ...currentRoof, roofAngleSet: e.target.value })}
- />
-
-
-
-
- {/* {
- const v = normalizeDecimal(e.target.value)
- e.target.value = v
- if (index === 0) {
- const num = v === '' ? '' : Number(v)
- setCurrentRoof({ ...currentRoof, pitch: num === '' ? '' : num, angle: num === '' ? '' : getDegreeByChon(num) })
- } else {
- const num = v === '' ? '' : Number(v)
- setCurrentRoof({ ...currentRoof, pitch: num === '' ? '' : getChonByDegree(num), angle: num === '' ? '' : num })
- }
- }}
- /> */}
- {
- if (index === 0) {
- const pitch = value === '' ? '' : Number(value)
- const angle = pitch === '' ? '' : getDegreeByChon(pitch)
- setCurrentRoof((prev) => ({
- ...prev,
- pitch,
- angle,
- }))
- } else {
- const angle = value === '' ? '' : Number(value)
- const pitch = angle === '' ? '' : getChonByDegree(angle)
- setCurrentRoof((prev) => ({
- ...prev,
- pitch,
- angle,
- }))
- }
- }}
- options={{
- allowNegative: false,
- allowDecimal: true,
- }}
- />
-
- {index === 0 ? '寸' : '度'}
-
- ))}
-
- |
-
|
@@ -600,6 +524,82 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
)} */}
|
+
+ | {getMessage('modal.placement.initial.setting.roof.angle.setting')} |
+
+
+ {currentRoof &&
+ roofAngleSetArray.map((item, index) => (
+
+
+
+ setCurrentRoof({ ...currentRoof, roofAngleSet: e.target.value })}
+ />
+
+
+
+
+ {/* {
+ const v = normalizeDecimal(e.target.value)
+ e.target.value = v
+ if (index === 0) {
+ const num = v === '' ? '' : Number(v)
+ setCurrentRoof({ ...currentRoof, pitch: num === '' ? '' : num, angle: num === '' ? '' : getDegreeByChon(num) })
+ } else {
+ const num = v === '' ? '' : Number(v)
+ setCurrentRoof({ ...currentRoof, pitch: num === '' ? '' : getChonByDegree(num), angle: num === '' ? '' : num })
+ }
+ }}
+ /> */}
+ {
+ if (index === 0) {
+ const pitch = value === '' ? '' : Number(value)
+ const angle = pitch === '' ? '' : getDegreeByChon(pitch)
+ setCurrentRoof((prev) => ({
+ ...prev,
+ pitch,
+ angle,
+ }))
+ } else {
+ const angle = value === '' ? '' : Number(value)
+ const pitch = angle === '' ? '' : getChonByDegree(angle)
+ setCurrentRoof((prev) => ({
+ ...prev,
+ pitch,
+ angle,
+ }))
+ }
+ }}
+ options={{
+ allowNegative: false,
+ allowDecimal: true,
+ }}
+ />
+
+ {index === 0 ? '寸' : '度'}
+
+ ))}
+
+ |
+
diff --git a/src/hooks/option/useCanvasSetting.js b/src/hooks/option/useCanvasSetting.js
index 11315cdf..a4068f92 100644
--- a/src/hooks/option/useCanvasSetting.js
+++ b/src/hooks/option/useCanvasSetting.js
@@ -326,9 +326,14 @@ export function useCanvasSetting(executeEffect = true) {
}
try {
+ const apiUrl = `/api/canvas-management/canvas-basic-settings/by-object/${correntObjectNo}/${planNo}`
+ logger.log('🔍 fetchBasicSettings API 호출:', apiUrl)
+ logger.log('🔍 correntObjectNo:', correntObjectNo, 'planNo:', planNo)
+
await get({
- url: `/api/canvas-management/canvas-basic-settings/by-object/${correntObjectNo}/${planNo}`,
+ url: apiUrl,
}).then((res) => {
+ logger.log('📦 API 응답 데이터:', res)
let roofsRow = {}
let roofsArray = {}
@@ -388,17 +393,23 @@ export function useCanvasSetting(executeEffect = true) {
/** 메뉴에서 배치면 초기설정 클릭 시 실행하지 않음 */
if (openPoint === null) {
+ logger.log('🎯 팝업 열기 조건 충족: openPoint=', openPoint, 'res.length=', res.length)
/** 배치면 초기설정 미저장 상태이면 화면 열기 */
- const placementInitialProps = {
- id: popupId,
- pos: {
- x: 50,
- y: 180,
- },
- planNo: planNo,
- openPoint: 'useCanvasSetting',
- }
- addPopup(popupId, 1, )
+ // 다른 closeAll 호출이 끝날 때까지 기다림
+ //setTimeout(() => {
+ const placementInitialProps = {
+ id : popupId,
+ pos : {
+ x: 50,
+ y: 180,
+ },
+ planNo : planNo,
+ openPoint: 'useCanvasSetting',
+ }
+ addPopup(popupId, 1, )
+ // },50)
+ } else {
+ logger.log('❌ 팝업 열기 조건 불충족: openPoint=', openPoint)
}
}