From 21a25de096a9048867288c8471eb3ccc5b39a5e9 Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 10 Apr 2025 16:18:29 +0900 Subject: [PATCH 1/4] =?UTF-8?q?UiModal=20noheaderYn,=20noFooterYn=20?= =?UTF-8?q?=EC=9D=84=20=EB=84=A3=EC=9C=BC=EB=A9=B4=20=ED=97=A4=EB=8D=94?= =?UTF-8?q?=EC=99=80=20=ED=92=8B=ED=84=B0=EC=98=81=EC=97=AD=20=EC=95=88?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/dialog_ui/index.tsx | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/packages/common/business_components/src/ui/dialog_ui/index.tsx b/packages/common/business_components/src/ui/dialog_ui/index.tsx index ef611fa40..0f14c211e 100644 --- a/packages/common/business_components/src/ui/dialog_ui/index.tsx +++ b/packages/common/business_components/src/ui/dialog_ui/index.tsx @@ -6,22 +6,40 @@ type ModalType = { body: React.ReactNode; open?: boolean; onOpenChange?: (open: boolean) => void; + noHeaderYn?: 'N' | 'Y'; + noFooterYn?: 'N' | 'Y'; + headerTitle?: string; + footerContent?: React.ReactNode; } -export function UiModal({ bodyClass, body, open, onOpenChange }: ModalType) { +export function UiModal({ + bodyClass, + body, + open, + onOpenChange, + noHeaderYn = 'N', + noFooterYn = 'N', + headerTitle, + footerContent +}: ModalType) { return ( <> - - - - - - {(open && body)} - - + {noHeaderYn === 'N' && ( + + + {headerTitle} + + + )} + {(open && body)} + {noFooterYn === 'N' && ( + + {footerContent} + + )} From 0267ffb0d999e65434b96fe0def0136083c866ae Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Fri, 11 Apr 2025 17:38:41 +0900 Subject: [PATCH 2/4] =?UTF-8?q?UiTable=EC=97=90=EC=84=9C=20header=EC=86=8D?= =?UTF-8?q?=EC=84=B1=EC=97=90=20align=20right=20=EC=9D=B4=20=EC=9E=88?= =?UTF-8?q?=EC=9D=84=20=EC=9A=B0=EC=B8=A1=EC=A0=95=EB=A0=AC=20=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/table/index.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 368abc5cc..ae93cd46f 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -17,6 +17,7 @@ type UiTableProps = { type UiHeadProps = { id: string; title: string; + align?: string; } export function UiTable({ tableData, headlist, pageSize, total, children, headName, cellClick, onPageChange, className = '' }: UiTableProps) { @@ -55,8 +56,16 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {tableData?.map((el: { [key: string]: any}, index) => ( {headlist?.map((head) => ( - // handleCellClick(index)} key={head.id + index}>{el[head.id]} - handleCellClick(index,head.id)} key={head.id + index}>{el[head.id]} + handleCellClick(index, head.id)} + key={head.id + index} + > + {el[head.id]} + ))} ))} From a5c3405049094e015c7e159e4b1c65a4b851396b Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Mon, 14 Apr 2025 14:28:53 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EC=9E=AC=EC=A1=B0=ED=9A=8C=ED=96=88?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20resetPageNo=20prop=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=9D=BC=201=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EB=8F=8C=EC=95=84=EA=B0=80=EB=8F=84=EB=A1=9D=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 --- .../src/ui/table/index.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index ae93cd46f..fc0d5adfb 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -12,6 +12,7 @@ type UiTableProps = { cellClick : ((index:number|undefined, headId:string)=>void )| undefined; onPageChange: (page: number) => void; className?: string; + resetPageNo?: boolean; } type UiHeadProps = { @@ -20,22 +21,27 @@ type UiHeadProps = { align?: string; } -export function UiTable({ tableData, headlist, pageSize, total, children, headName, cellClick, onPageChange, className = '' }: UiTableProps) { +export function UiTable({ tableData, headlist, pageSize, total, children, headName, cellClick, onPageChange, className = '', resetPageNo = false }: UiTableProps) { const [cur, setCur] = useState(1); const [idx, setIdx] = useState(-1); + + useEffect(() => { + if (resetPageNo) { + setCur(1); + onPageChange(1); + } + }, [onPageChange, resetPageNo]); + const handlePageChange = (page: number) => { setCur(page); onPageChange(page); } - const handleCellClick = (index: number,headId:string )=> { if (cellClick) { cellClick(index,headId); setIdx(index); } - - }; return ( @@ -53,8 +59,8 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa } - {tableData?.map((el: { [key: string]: any}, index) => ( - + {tableData?.map((el: { [key: string]: string | number | boolean | object}, index) => ( + {headlist?.map((head) => ( handleCellClick(index, head.id)} key={head.id + index} > - {el[head.id]} + {String(el[head.id] ?? '')} ))} From 42b6dfc616c308e474a354de305ed6bb6dc89e80 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 16 Apr 2025 11:07:54 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EA=B3=A0=EC=A0=95=20=EB=B0=8F=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=20=EC=8B=9C=20text=20bold=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/business_components/src/ui/table/index.tsx | 6 +++--- packages/common/components/src/ui/table/index.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index fc0d5adfb..c8ba18765 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -50,8 +50,8 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa

{headName}

: <>}
- - +
+ {children ? <>{children} : {headlist?.map((head) => ( {head.title} @@ -64,7 +64,7 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {headlist?.map((head) => ( handleCellClick(index, head.id)} diff --git a/packages/common/components/src/ui/table/index.tsx b/packages/common/components/src/ui/table/index.tsx index 797f48dfd..082b2e33b 100644 --- a/packages/common/components/src/ui/table/index.tsx +++ b/packages/common/components/src/ui/table/index.tsx @@ -29,7 +29,7 @@ const TableHeader = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( - + )); TableHeader.displayName = "TableHeader";