From 0ad7d6a2c4c8d7585d6a5b053444dd6c2b35b710 Mon Sep 17 00:00:00 2001 From: jyha00 Date: Sat, 26 Jul 2025 15:58:47 +0900 Subject: [PATCH] =?UTF-8?q?searchBaseForm=20=EB=B2=84=ED=8A=BC=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=20=EB=B3=80=EA=B2=BD=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/chart/DoubleBar.tsx | 1 - .../src/ui/search_base_form/index.tsx | 38 ++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/common/business_components/src/ui/chart/DoubleBar.tsx b/packages/common/business_components/src/ui/chart/DoubleBar.tsx index 9627485aa..be930f3af 100644 --- a/packages/common/business_components/src/ui/chart/DoubleBar.tsx +++ b/packages/common/business_components/src/ui/chart/DoubleBar.tsx @@ -83,7 +83,6 @@ export default function DoubleBarChart({chartConfig=undefined, chartData=[], cha .map(key => item[key]) ).flat()); }; - console.log(chartData); const barMaxValue = getMaxValue(chartData, 'barVal'); return ( <> diff --git a/packages/common/business_components/src/ui/search_base_form/index.tsx b/packages/common/business_components/src/ui/search_base_form/index.tsx index cd26f7742..f99963f14 100644 --- a/packages/common/business_components/src/ui/search_base_form/index.tsx +++ b/packages/common/business_components/src/ui/search_base_form/index.tsx @@ -24,6 +24,7 @@ type SearchBaseType = { rightClassName?: string; leftClassName?: string; leftSelectClassName?: string; + buttonOrder?: ("query" | "init" | "excel")[]; } export type ReturnType = { partValue: string; @@ -55,7 +56,8 @@ function SearchBaseForm ({ isAdmin=false, rightClassName, leftClassName, - leftSelectClassName + leftSelectClassName, + buttonOrder }: SearchBaseType) { const [partValue, setPartValue] = useState("A"); const [sidoValue, setSidoValue] = useState("0"); @@ -67,6 +69,30 @@ function SearchBaseForm ({ const [middleRegionValue, setMiddleRegionValue] = useState("0"); const [envPartValue, setEnvPartValue] = useState("0"); const [resetTrigger, setResetTrigger] = useState(false); + const renderButton = (type: "query" | "init" | "excel") => { + switch (type) { + case "query": + return ( + + ); + case "init": + return ( + + ); + case "excel": + return ( + + ); + default: + return null; + } + }; const queryVal = () => { console.log("조회버튼 클릭"); queryClick({ @@ -145,16 +171,8 @@ function SearchBaseForm ({ {leftChildren} -
- - + {(buttonOrder ?? ["excel", "init", "query"]).map(renderButton)}
{rightChildren}