{/* 패널 선택 */}
데이터를 가져올 패널을 선택합니다.
{/* 소스 컬럼 */}
{
const col = currentColumns.find((c) => c.column_name === value);
setEditingField({
...editingField,
sourceColumn: value,
// 타겟 컬럼이 비어있으면 소스와 동일하게 설정
targetColumn: editingField.targetColumn || value,
// 라벨이 비어있으면 컬럼 코멘트 사용
label: editingField.label || col?.column_comment || "",
});
}}
placeholder="컬럼 선택..."
disabled={currentColumns.length === 0}
/>
{currentColumns.length === 0 && (
{currentTableName ? "테이블에 컬럼이 없습니다." : "테이블을 먼저 선택해주세요."}
)}
{/* 타겟 컬럼 */}
{/* 라벨 (선택) */}
setEditingField({ ...editingField, label: e.target.value })}
placeholder="표시용 이름"
className="mt-1 h-9 text-sm"
/>
{/* 설명 (선택) */}
setEditingField({ ...editingField, description: e.target.value })}
placeholder="이 필드에 대한 설명"
className="mt-1 h-9 text-sm"
/>
{/* 미리보기 */}
{editingField.sourceColumn && editingField.targetColumn && (
미리보기
{editingField.panel === "left" ? "좌측" : "우측"}
{editingField.sourceColumn}
{editingField.targetColumn}
)}