From e0a2035e0e0854013b14f6422e3b8b1067ea46aa Mon Sep 17 00:00:00 2001 From: jyha00 Date: Thu, 22 May 2025 17:43:29 +0900 Subject: [PATCH 1/7] =?UTF-8?q?SearchFormRight=20className=20=ED=8C=8C?= =?UTF-8?q?=EB=9D=BC=EB=AF=B8=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 --- .../business_components/src/ui/search_form_right/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/business_components/src/ui/search_form_right/index.tsx b/packages/common/business_components/src/ui/search_form_right/index.tsx index fda7eefd6..f5a92dde7 100644 --- a/packages/common/business_components/src/ui/search_form_right/index.tsx +++ b/packages/common/business_components/src/ui/search_form_right/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; -function SearchFormRight(props: {children: React.ReactNode}) { +function SearchFormRight(props: {children: React.ReactNode, className?: string}) { return ( -
+
{props.children}
) From 97aab7cae474bcf2cd4cc03b01c8f246d6c521c8 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 22 May 2025 17:47:44 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EA=B2=B0=ED=95=A8=EC=88=98=EC=A0=95=20-=20?= =?UTF-8?q?,=EA=B0=80=20=EC=9E=88=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20number?= =?UTF-8?q?=20nan=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0,=20=EB=B0=94=20?= =?UTF-8?q?=EC=B0=A8=ED=8A=B8=20fieldText=EC=9C=84=EC=B9=98=20=EC=A1=B0?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/chart/BarChart.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/chart/BarChart.tsx b/packages/common/business_components/src/ui/chart/BarChart.tsx index b75bf373c..cdc88075b 100644 --- a/packages/common/business_components/src/ui/chart/BarChart.tsx +++ b/packages/common/business_components/src/ui/chart/BarChart.tsx @@ -76,7 +76,15 @@ const CustomLegend = (props: any) => { export default function Chart({chartConfig=undefined, chartData=[], chartTitle='차트', chartClassName='w-full h-full', graphSize=40, yFieldText='', showLegend=false} : BarChartProps) { const colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#96CEB4", "#FFEEAD", "#D4A5A5"]; + const getMaxValue = (data: any[], keyPrefix: string) => { + return Math.max(...data.map(item => + Object.keys(item) + .filter(key => key.includes(keyPrefix)) + .map(key => item[key]) + ).flat()); + }; + const barMaxValue = getMaxValue(chartData, 'barVal'); return ( <> {chartTitle && chartTitle !== "" && chartTitle !== "undefined" ? ( @@ -102,7 +110,8 @@ export default function Chart({chartConfig=undefined, chartData=[], chartTitle=' axisLine={true} fontSize={12} fontWeight={500} - label={yFieldText ? { value: yFieldText, className:"text-[13px] foont-bold", position: 'top', textAnchor: 'middle', offset: 20 } : undefined} + domain={[0, Math.ceil(barMaxValue * 1)]} + label={yFieldText ? { value: yFieldText, className:"text-[13px] font-bold", position: 'insideLeft', angle: -90, offset: 20 } : undefined} /> }/> {chartData && chartData.length > 0 && ( From 68abf4184a276eb2d0f559160e31f4c7495d29f4 Mon Sep 17 00:00:00 2001 From: truthwing Date: Fri, 23 May 2025 17:34:08 +0900 Subject: [PATCH 3/7] =?UTF-8?q?ts=20=EC=88=98=EC=A0=95=EB=90=9C=20?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EC=A0=81=EC=9A=A9=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../common/business_components/src/ui/excel/excelStyle.tsx | 2 +- packages/common/business_components/src/ui/tab/index.tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 159f30a50..e5ac02e0c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "packages/*" ], "scripts": { - "build": "turbo run build --filter=!wr", + "build": "turbo run build", "dev": "turbo run dev", "dev:cs": "turbo run dev --filter=cs", "dev:wr": "turbo run dev --filter=wr", diff --git a/packages/common/business_components/src/ui/excel/excelStyle.tsx b/packages/common/business_components/src/ui/excel/excelStyle.tsx index 6674720dc..1c6b2b0e2 100644 --- a/packages/common/business_components/src/ui/excel/excelStyle.tsx +++ b/packages/common/business_components/src/ui/excel/excelStyle.tsx @@ -38,7 +38,7 @@ export const excelStyle = async (data: ArrayBuffer, range: string = "A1:V3", fil } -export const excelArrayStyle = async (data: ArrayBuffer, range: [typeof sheetParameter], fileNm:string) => { +export const excelArrayStyle = async (data: ArrayBuffer, range: Array, fileNm:string) => { const workbook = await XlsxPopulate.Workbook.fromData(data); if(range){ range.forEach((item , index)=>{ diff --git a/packages/common/business_components/src/ui/tab/index.tsx b/packages/common/business_components/src/ui/tab/index.tsx index 9dde67780..4fb305830 100644 --- a/packages/common/business_components/src/ui/tab/index.tsx +++ b/packages/common/business_components/src/ui/tab/index.tsx @@ -16,13 +16,13 @@ interface UITabProps extends React.HTMLAttributes { const UITab = React.forwardRef< HTMLDivElement, UITabProps ->(({defaultValue, tabList, children, onValueChange, ...props}, ref)=>{ +>(({defaultValue, tabList, children, onValueChange})=>{ + // Exclude 'dir' if it exists and is not of the correct type return ( - {tabList.map((tab) => ( From 1aea094798beb4329ae2099356266b79f13db047 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 26 May 2025 09:27:07 +0900 Subject: [PATCH 4/7] =?UTF-8?q?build=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/next-env.d.ts | 5 ++ .../src/ui/chart/BarChart.tsx | 6 +- .../src/ui/chart/LineChart.tsx | 17 ++--- .../src/ui/excel/excelStyle.tsx | 11 ++-- .../src/ui/excel/index.tsx | 63 ++++++++----------- .../src/ui/search_base_form/index.tsx | 2 + .../src/ui/search_form_left/index.tsx | 4 +- .../business_components/src/ui/tab/index.tsx | 54 ++++++++-------- .../src/ui/table/index.tsx | 2 + 9 files changed, 86 insertions(+), 78 deletions(-) create mode 100644 apps/fo/next-env.d.ts diff --git a/apps/fo/next-env.d.ts b/apps/fo/next-env.d.ts new file mode 100644 index 000000000..1b3be0840 --- /dev/null +++ b/apps/fo/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/packages/common/business_components/src/ui/chart/BarChart.tsx b/packages/common/business_components/src/ui/chart/BarChart.tsx index cdc88075b..0802a72e4 100644 --- a/packages/common/business_components/src/ui/chart/BarChart.tsx +++ b/packages/common/business_components/src/ui/chart/BarChart.tsx @@ -64,10 +64,10 @@ const CustomLegend = (props: any) => { const { payload } = props; return (
- {payload.map((entry, index: number) => ( + {payload.map((entry: unknown, index: number) => (
-
- {entry.value} +
+ {(entry as {value: string}).value}
))}
diff --git a/packages/common/business_components/src/ui/chart/LineChart.tsx b/packages/common/business_components/src/ui/chart/LineChart.tsx index a689af8ca..4014702b6 100644 --- a/packages/common/business_components/src/ui/chart/LineChart.tsx +++ b/packages/common/business_components/src/ui/chart/LineChart.tsx @@ -113,20 +113,21 @@ export default function Linechart({ }, []); // 데이터의 최대값 계산 - const getMaxValue = (data: ChartDataType, keyPrefix: string) => { - return Math.max(...Object.values(data).map(item => - Object.keys(item) - .filter(key => key.includes(keyPrefix)) - .map(key => item[key] as unknown as number) - ).flat()); + const getMaxValue = (data: ChartDataType): number => { + return Math.max(...Object.values(data).flatMap(dataset => + dataset.map(entry => { + const val = parseFloat(entry.val); + return isNaN(val) ? 0 : val; + }) + )); }; - const lineMaxValue = getMaxValue(chartData, 'lineVal'); + const lineMaxValue = getMaxValue(chartData); return (
{chartTitle && chartTitle !== "" && chartTitle !== "undefined" ? ( -
+
{chartTitle}
) : null} diff --git a/packages/common/business_components/src/ui/excel/excelStyle.tsx b/packages/common/business_components/src/ui/excel/excelStyle.tsx index 1c6b2b0e2..3c8f8d219 100644 --- a/packages/common/business_components/src/ui/excel/excelStyle.tsx +++ b/packages/common/business_components/src/ui/excel/excelStyle.tsx @@ -1,5 +1,6 @@ -import type { sheetParameter } from '@/index'; +// import type { sheetParameter } from '@/index'; import * as XlsxPopulate from '@xlsx/xlsx-populate'; +import type { SheetParameter } from './index'; @@ -38,13 +39,13 @@ export const excelStyle = async (data: ArrayBuffer, range: string = "A1:V3", fil } -export const excelArrayStyle = async (data: ArrayBuffer, range: Array, fileNm:string) => { +export const excelArrayStyle = async (data: ArrayBuffer, range: SheetParameter[], fileNm: string) => { const workbook = await XlsxPopulate.Workbook.fromData(data); - if(range){ - range.forEach((item , index)=>{ + if (range) { + range.forEach((item, index) => { const rangeCells = workbook.activeSheet(index)?.sheet(index)?.range(item.headerRange); console.log(rangeCells); - rangeCells?.style((styleQ)=>{ + rangeCells?.style((styleQ) => { makeCellStyle(styleQ) }); diff --git a/packages/common/business_components/src/ui/excel/index.tsx b/packages/common/business_components/src/ui/excel/index.tsx index 76b4ba2f9..96f3b3e5d 100644 --- a/packages/common/business_components/src/ui/excel/index.tsx +++ b/packages/common/business_components/src/ui/excel/index.tsx @@ -5,7 +5,7 @@ type ExcelDownloadProps = { data: JSON | JSON[]; fileName: string; sheetNameArray: string[]; - headerRange: string; + headerRange?: string; } export const downloadExcel = ({ data, fileName = new Date().getTime().toString() + '.xlsx', sheetNameArray = ["Sheet1"], headerRange='A1:V3'}: ExcelDownloadProps) => { @@ -15,17 +15,21 @@ export const downloadExcel = ({ data, fileName = new Date().getTime().toString() excelStyle(XLSX.write(workbook, { bookType: "xlsx", type: "buffer" }), headerRange, fileName); }; -export const sheetParameter ={ - data:[[]], headerNum:0, headerRange:'A1:V3', sheetName:'Sheet1', startCol:0 -} +export type SheetParameter = { + data: any[][]; + headerNum: number; + headerRange: string; + sheetName: string; + startCol?: string; +}; -export const downloadMultipleExcel = (fileName = new Date().getTime().toString() + '.xlsx', sheetArray: Array): Promise => { +export const downloadMultipleExcel = (fileName = new Date().getTime().toString() + '.xlsx', sheetArray: SheetParameter[]): Promise => { const workbook = XLSX.utils.book_new(); for (let i = 0; i < sheetArray.length; i++) { // Create a new worksheet for each sheet const worksheet = XLSX.utils.aoa_to_sheet(sheetArray[i]?.data || [[]]); // Add data to the worksheet starting from the specified header number - if (sheetArray&&sheetArray[i]?.headerNum) { + if (sheetArray && sheetArray[i]?.headerNum) { XLSX.utils.sheet_add_aoa(worksheet, sheetArray[i]?.data || [[]], { origin: `A${sheetArray[i]?.headerNum}` }); } // Append the worksheet to the workbook with the specified sheet name @@ -37,7 +41,6 @@ export const downloadMultipleExcel = (fileName = new Date().getTime().toString() return Promise.resolve(undefined); }; - export const filePicked=(oFile: File, headerNum:number=0, dateType="yyyymmdd"):Promise =>{ // Create A File Reader HTML5 const reader = new FileReader(); @@ -80,8 +83,6 @@ export const filePicked=(oFile: File, headerNum:number=0, dateType="yyyymmdd"):P }); } - - export const filePickedArray=(oFile: File, headerNum:number=0):Promise =>{ // Create A File Reader HTML5 const reader = new FileReader(); @@ -123,8 +124,6 @@ export const filePickedArray=(oFile: File, headerNum:number=0):Promise =>{ // Create A File Reader HTML5 return new Promise(() => { // Ready The Event For When A File Gets Selected @@ -149,28 +148,20 @@ export const filePickedBlob=(oFile: ArrayBuffer, data:[][],fileNm:string, header }); } - export const filePickedBlobArray= (oFile: ArrayBuffer,fileNm:string, sheetArray: [typeof sheetParameter]):Promise =>{ // Create A File Reader HTML5 - return new Promise (async () => { - // Ready The Event For When A File Gets Selected - const wb = XLSX.read(oFile, { type: 'binary' }); - // Loop Over Each Sheet - wb.SheetNames.forEach( function (sheetName, index) { - // Obtain The Current Row As CSV - if(sheetArray[index]){ - const sheet = wb.Sheets[sheetName]; - if (sheet) { - //오리진 확인 test 필요 - // const sheet = XLSX.utils.json_to_sheet(data); - const startCol = sheetArray[index].startCol?sheetArray[index].startCol.toString():'A'; - XLSX.utils.sheet_add_aoa(sheet, sheetArray[index].data, { origin: startCol+sheetArray[index].headerNum }); - // XLSX.utils.book_append_sheet(wb, sheet, 'test'); - } else { - console.error(`Sheet "${sheetName}" is undefined.`); - } - } - }); - - - await excelArrayStyle(XLSX.write(wb, { bookType: "xlsx", type: "buffer" }), sheetArray, fileNm) - }); - } \ No newline at end of file +export const filePickedBlobArray = (oFile: ArrayBuffer, fileNm: string, sheetArray: SheetParameter[]): Promise => { + return new Promise(async () => { + const wb = XLSX.read(oFile, { type: 'binary' }); + wb.SheetNames.forEach(function (sheetName, index) { + if (sheetArray[index]) { + const sheet = wb.Sheets[sheetName]; + if (sheet) { + const startCol = sheetArray[index].startCol ? sheetArray[index].startCol : 'A'; + XLSX.utils.sheet_add_aoa(sheet, sheetArray[index].data, { origin: startCol + sheetArray[index].headerNum }); + } else { + console.error(`Sheet "${sheetName}" is undefined.`); + } + } + }); + await excelArrayStyle(XLSX.write(wb, { bookType: "xlsx", type: "buffer" }), sheetArray, fileNm) + }); +} \ No newline at end of file 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 9dc1bf735..b8d8355ae 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 @@ -1,3 +1,5 @@ +"use client" + import { Button } from "@common/components/ui"; import { useCallback, useEffect, useState } from "react"; import { SearchFormLeft, type EnvPartSelectDataType } from "../search_form_left"; diff --git a/packages/common/business_components/src/ui/search_form_left/index.tsx b/packages/common/business_components/src/ui/search_form_left/index.tsx index ec9e814f5..02112f084 100644 --- a/packages/common/business_components/src/ui/search_form_left/index.tsx +++ b/packages/common/business_components/src/ui/search_form_left/index.tsx @@ -1,4 +1,6 @@ -import React, { useEffect, useState } from 'react'; +"use client" + +import React, { useEffect, useState } from 'react'; import type { SelectDataType } from '../search_input_select'; import { SelectBox } from '../select'; diff --git a/packages/common/business_components/src/ui/tab/index.tsx b/packages/common/business_components/src/ui/tab/index.tsx index 4fb305830..aee969460 100644 --- a/packages/common/business_components/src/ui/tab/index.tsx +++ b/packages/common/business_components/src/ui/tab/index.tsx @@ -6,37 +6,41 @@ interface TabItem { label: string; } -interface UITabProps extends React.HTMLAttributes { +interface UITabProps extends Omit, 'dir'> { defaultValue?: string; tabList: TabItem[]; children: React.ReactNode; onValueChange?: (value: string) => void; } -const UITab = React.forwardRef< +const UITab = React.forwardRef< HTMLDivElement, UITabProps ->(({defaultValue, tabList, children, onValueChange})=>{ - // Exclude 'dir' if it exists and is not of the correct type - return ( - - - {tabList.map((tab) => ( - - {tab.label} - - ))} - - {children} - - ) -}) +>(({defaultValue, tabList, children, onValueChange, ...props}, ref) => { + return ( + + + {tabList.map((tab) => ( + + {tab.label} + + ))} + + {children} + + ); +}); + +UITab.displayName = 'UITab'; + export { UITab }; diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 791eddffe..48f4deb62 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -1,3 +1,5 @@ +"use client" + import { Table, TableBody, TableCell, TableHeader, TableRow } from "@common/components"; import { useEffect, useState } from "react"; import { HeadMakeColSpan } from "./HeadMakeColSpan"; From cb5235864e89df111cf2df41101982bb8592f03c Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 26 May 2025 16:38:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=EC=B4=9D=EC=82=AC=EC=97=85=EC=9E=90?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=EB=B2=88=ED=98=B8=20=EC=B2=B4=ED=81=AC?= =?UTF-8?q?=EB=B0=95=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/form_ui/index.tsx | 65 ++++++++++++++----- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/packages/common/business_components/src/ui/form_ui/index.tsx b/packages/common/business_components/src/ui/form_ui/index.tsx index bd9930c3c..8fab0118c 100644 --- a/packages/common/business_components/src/ui/form_ui/index.tsx +++ b/packages/common/business_components/src/ui/form_ui/index.tsx @@ -1,19 +1,54 @@ -import React from "react"; +import React, { useCallback, useState } from "react"; import { FormControl, FormItem, FormLabel, FormMessage } from "../form"; +import { Checkbox } from "@common/components/ui"; + +interface FormUiProps extends React.HTMLAttributes { + label?: string; + onCheckboxChange?: (checked: boolean) => void; + isDisabled?: boolean; +} + +interface FormElementProps extends React.HTMLAttributes { + disabled?: boolean; +} + +const FormUi = React.forwardRef( + ({ children, label, onCheckboxChange, isDisabled }, ref) => { + const [isChecked, setIsChecked] = useState(false); + + const handleCheckboxChange = useCallback((checked: boolean) => { + setIsChecked(checked); + onCheckboxChange?.(checked); + }, [onCheckboxChange]); -const FormUi = React.forwardRef< - HTMLDivElement, - React.HTMLAttributes & {label:string|undefined} ->(({children, label},ref)=>{ return ( - - {label?{label}:<>} - - {children} - - - - ) -}) + + {label && {label}} + {label === '종사업자등록번호' && ( +
+
+ + +
+
+ )} + + {React.isValidElement(children) && isDisabled + ? React.cloneElement(children, { + disabled: true, + ...(children.props as FormElementProps) + }) + : children} + + +
+ ); + } +); + FormUi.displayName = 'FormUi'; -export { FormUi }; +export { FormUi }; \ No newline at end of file From bc75831da21c06f6fb5292d515810891463ae3a4 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 26 May 2025 17:45:00 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=EB=9D=BC=EB=B2=A8=20=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=ED=81=AC=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/business_components/src/ui/form_ui/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/form_ui/index.tsx b/packages/common/business_components/src/ui/form_ui/index.tsx index 8fab0118c..1ad3afa05 100644 --- a/packages/common/business_components/src/ui/form_ui/index.tsx +++ b/packages/common/business_components/src/ui/form_ui/index.tsx @@ -32,7 +32,7 @@ const FormUi = React.forwardRef( checked={isChecked} onCheckedChange={handleCheckboxChange} /> - +
)} From beb00412c10b3395794cb6bf28124f368871fbd8 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Tue, 27 May 2025 18:03:39 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=ED=9B=84=EB=B3=B4=EC=A7=80=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=EC=B9=B8=20=EB=B3=84=EB=8F=84=EC=9D=98=20=ED=8F=BC?= =?UTF-8?q?=EC=98=81=EC=97=AD=20=EC=83=9D=EC=84=B1=EC=99=84=EB=A3=8C,=20?= =?UTF-8?q?=EB=9D=BC=EB=B2=A8=20=EB=B3=80=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/form_ui/index.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/common/business_components/src/ui/form_ui/index.tsx b/packages/common/business_components/src/ui/form_ui/index.tsx index 1ad3afa05..ec1854636 100644 --- a/packages/common/business_components/src/ui/form_ui/index.tsx +++ b/packages/common/business_components/src/ui/form_ui/index.tsx @@ -1,6 +1,9 @@ import React, { useCallback, useState } from "react"; import { FormControl, FormItem, FormLabel, FormMessage } from "../form"; -import { Checkbox } from "@common/components/ui"; +import { Button, Checkbox } from "@common/components/ui"; + +export const BZNM_TOT_NO = '총사업자등록번호'; +export const CANDIDATE = '공급처 후보지 선택(필수아님)'; interface FormUiProps extends React.HTMLAttributes { label?: string; @@ -20,11 +23,11 @@ const FormUi = React.forwardRef( setIsChecked(checked); onCheckboxChange?.(checked); }, [onCheckboxChange]); - + console.log(children); return ( {label && {label}} - {label === '종사업자등록번호' && ( + {label === BZNM_TOT_NO && (
(
)} + {label === CANDIDATE && ( + + {children} + + )} + {label !== BZNM_TOT_NO && label !== CANDIDATE && ( {React.isValidElement(children) && isDisabled ? React.cloneElement(children, { @@ -44,6 +53,7 @@ const FormUi = React.forwardRef( }) : children} + )}
);