From 6e10389b33db5ef634274a36d0e106c149db0d59 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 3 Apr 2025 17:52:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/business_components/src/ui/table/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 70240f125..8ac91c7ec 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -24,6 +24,8 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa setCur(page); onPageChange(page); } + const style = cellClick ? 'cursor-pointer' : ''; + return ( <> {headName ?
@@ -42,7 +44,7 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {tableData?.map((el: { [key: string]: string | number | boolean | object}, index) => ( {headlist?.map((head) => ( - cellClick && cellClick(index)} key={head.id + index}>{el[head.id]} + cellClick && cellClick(index)} key={head.id + index}>{el[head.id]} ))} ))} From 6e390199b3518f0b88641c01b0b5dc91ac8e32bc Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 3 Apr 2025 18:22:36 +0900 Subject: [PATCH 2/3] =?UTF-8?q?max=20=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/business_components/src/ui/table/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 8ac91c7ec..c04b26a6f 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -31,7 +31,7 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {headName ?

{headName}

: <>} -
+
{children ? <>{children} : From 7c1cc6df65822576ae95cd3fd5839da8ba7a59ee Mon Sep 17 00:00:00 2001 From: leedj312 Date: Thu, 3 Apr 2025 18:26:39 +0900 Subject: [PATCH 3/3] =?UTF-8?q?datepicker=20=ED=95=9C=EA=B8=80=20=EB=B0=8F?= =?UTF-8?q?=20=EC=84=A0=ED=83=9D=ED=9B=84=20=ED=8C=9D=EC=98=A4=EB=B2=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/date_picker/index.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/common/business_components/src/ui/date_picker/index.tsx b/packages/common/business_components/src/ui/date_picker/index.tsx index a7694789b..8fcd9b52e 100644 --- a/packages/common/business_components/src/ui/date_picker/index.tsx +++ b/packages/common/business_components/src/ui/date_picker/index.tsx @@ -10,12 +10,23 @@ import { Button, Calendar, Popover, PopoverContent, PopoverTrigger } from "@comm import { cn } from "../../lib/utils"; import { FormControl } from "../form"; import { ko } from "date-fns/locale"; +import { useState } from "react"; type DatePickerProps = DayPickerSingleProps & { field: { value: Date; onChange: (date: Date | undefined) => void } ,selectClass:string|undefined }; + export function DatePicker({ field, selectClass }: DatePickerProps) { + + + const [open, setOpen] = useState(false); + + const handleSelect = (date: Date | undefined) => { + field.onChange(date); // React Hook Form 업데이트 + setOpen(false); + }; + return ( - +