feat: 렉 구조 컴포넌트 v2 지원 및 불필요한 로그 제거

- 렉 구조 컴포넌트에서 v2-rack-structure를 지원하도록 수정하였습니다. 기존의 rack-structure 컴포넌트는 deprecated 처리되었습니다.
- 불필요한 콘솔 로그 메시지를 제거하여 코드의 가독성을 향상시켰습니다.
- 관련된 컴포넌트에서 v2 구조에 맞게 변경 사항을 반영하였습니다.
This commit is contained in:
kjs
2026-01-27 11:14:41 +09:00
parent 042488d51b
commit 8a2c13bba8
4 changed files with 8 additions and 55 deletions

View File

@@ -535,21 +535,14 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
);
}
// 🆕 렉 구조 컴포넌트 처리
if (comp.type === "component" && componentType === "rack-structure") {
const { RackStructureComponent } = require("@/lib/registry/components/rack-structure/RackStructureComponent");
// 🆕 렉 구조 컴포넌트 처리 (v1, v2 모두 지원)
if (comp.type === "component" && (componentType === "rack-structure" || componentType === "v2-rack-structure")) {
// v2 컴포넌트 사용 (v1은 deprecated)
const { RackStructureComponent } = require("@/lib/registry/components/v2-rack-structure/RackStructureComponent");
const componentConfig = (comp as any).componentConfig || {};
// config가 중첩되어 있을 수 있음: componentConfig.config 또는 componentConfig 직접
const rackConfig = componentConfig.config || componentConfig;
console.log("🏗️ 렉 구조 컴포넌트 렌더링:", {
componentType,
componentConfig,
rackConfig,
fieldMapping: rackConfig.fieldMapping,
formData,
});
return (
<div className="h-full w-full overflow-auto">
<RackStructureComponent
@@ -557,7 +550,6 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
formData={formData}
tableName={tableName}
onChange={(locations: any[]) => {
console.log("📦 렉 구조 위치 데이터 변경:", locations.length, "개");
// 컴포넌트의 columnName을 키로 사용
const fieldKey = (comp as any).columnName || "_rackStructureLocations";
updateFormData(fieldKey, locations);