From 901cb04a88a59da3d66d5a8d392cd3250d1d5cae Mon Sep 17 00:00:00 2001 From: kjs Date: Mon, 19 Jan 2026 14:18:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=91=EA=B3=84=20=EC=9C=84=EC=A0=AF=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1=20=ED=8C=A8=EB=84=90=20=EA=B0=9C=EC=84=A0:?= =?UTF-8?q?=20AggregationWidgetConfigPanel=EC=97=90=EC=84=9C=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=20=EC=83=81=ED=83=9C=EB=A5=BC=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=ED=95=98=EC=97=AC=20inputType=20=EB=B0=8F=20?= =?UTF-8?q?webType=EC=9D=84=20=EC=B6=94=EA=B0=80=ED=95=98=EC=98=80?= =?UTF-8?q?=EC=8A=B5=EB=8B=88=EB=8B=A4.=20=EC=88=AB=EC=9E=90=ED=98=95=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=BC=20=ED=95=84=ED=84=B0=EB=A7=81=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=EC=9D=84=20=EC=9E=85=EB=A0=A5=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=EC=97=90=20=EA=B8=B0=EB=B0=98=ED=95=98=EC=97=AC=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=ED=95=98=EC=97=AC,=20=EB=8B=A4=EC=96=91=ED=95=9C=20?= =?UTF-8?q?=EC=88=AB=EC=9E=90=ED=98=95=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=ED=83=80=EC=9E=85=EC=9D=84=20=EC=A7=80=EC=9B=90=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=ED=95=98=EC=98=80=EC=8A=B5=EB=8B=88?= =?UTF-8?q?=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AggregationWidgetConfigPanel.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx b/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx index fd38d3b9..ebfff828 100644 --- a/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx +++ b/frontend/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel.tsx @@ -34,7 +34,7 @@ export function AggregationWidgetConfigPanel({ onChange, screenTableName, }: AggregationWidgetConfigPanelProps) { - const [columns, setColumns] = useState>([]); + const [columns, setColumns] = useState>([]); const [loadingColumns, setLoadingColumns] = useState(false); const [availableTables, setAvailableTables] = useState>([]); const [loadingTables, setLoadingTables] = useState(false); @@ -93,6 +93,8 @@ export function AggregationWidgetConfigPanel({ columnName: col.columnName || col.column_name, label: col.displayName || col.columnLabel || col.column_label || col.label || col.columnName || col.column_name, dataType: col.dataType || col.data_type, + inputType: col.inputType || col.input_type, + webType: col.webType || col.web_type, })) ); } else { @@ -140,15 +142,19 @@ export function AggregationWidgetConfigPanel({ }); }; - // 숫자형 컬럼만 필터링 (count 제외) - const numericColumns = columns.filter( - (col) => - col.dataType?.toLowerCase().includes("int") || - col.dataType?.toLowerCase().includes("numeric") || - col.dataType?.toLowerCase().includes("decimal") || - col.dataType?.toLowerCase().includes("float") || - col.dataType?.toLowerCase().includes("double") - ); + // 숫자형 컬럼만 필터링 (count 제외) - 입력 타입(inputType/webType)으로만 확인 + const numericColumns = columns.filter((col) => { + const inputType = (col.inputType || col.webType || "")?.toLowerCase(); + + return ( + inputType === "number" || + inputType === "decimal" || + inputType === "integer" || + inputType === "float" || + inputType === "currency" || + inputType === "percent" + ); + }); return (