From a764bde89949bba57514e73d979c9961a323c53f Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 27 Mar 2025 16:34:41 +0900 Subject: [PATCH 1/4] =?UTF-8?q?modal=20=EC=88=98=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/alert_dialog_ui/index.tsx | 71 ++++++++++++------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx b/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx index 58b69cff6..27c67458d 100644 --- a/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx +++ b/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx @@ -1,33 +1,52 @@ -import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@common/components"; +import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@common/components"; - -type ModalType={ - bodyClass:string - butNm:string - title:string - body:React.ReactNode +type ModalType = { + bodyClass: string; + butNm: string; + title: string; + body: React.ReactNode; + open?: boolean; + onOpenChange?: (open: boolean) => void; } -export function UiModal({bodyClass,butNm,title ,body}:ModalType ) { + +export function UiModal({ bodyClass, butNm, title, body, open, onOpenChange }: ModalType) { + const dialogProps = open !== undefined && onOpenChange !== undefined + ? { open, onOpenChange } + : {}; + return ( <> - - - - - - - {title} - - - - {body} - - - - - - - + {!open && ( + + + + + + + {title} + + + + {body} + + + + + )} + {open && ( + + + + {title} + + + + {body} + + + + + )} ); } From 2919d7d637fb983c58b5e3cf47f4257320ba763e Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Thu, 27 Mar 2025 16:36:41 +0900 Subject: [PATCH 2/4] =?UTF-8?q?alert=20dialog=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/alert_dialog_ui/index.tsx | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 packages/common/business_components/src/ui/alert_dialog_ui/index.tsx diff --git a/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx b/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx new file mode 100644 index 000000000..8437c87a8 --- /dev/null +++ b/packages/common/business_components/src/ui/alert_dialog_ui/index.tsx @@ -0,0 +1,53 @@ +import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@common/components"; +import React from "react"; + +type ModalType = { + bodyClass: string; + butNm: string; + title: string; + body: React.ReactNode; + open?: boolean; + onOpenChange?: (open: boolean) => void; +} + +export function UiModal({ bodyClass, butNm, title, body, open, onOpenChange }: ModalType) { + const dialogProps = open !== undefined && onOpenChange !== undefined + ? { open, onOpenChange } + : {}; + + return ( + <> + {!open && ( + + + + + + + {title} + + + + {body} + + + + + )} + {open && ( + + + + {title} + + + + {body} + + + + + )} + + ); +} From fa9f97122680712c7b1fdbbca541cec1fefe3d8d Mon Sep 17 00:00:00 2001 From: YangJinSoo94 Date: Fri, 28 Mar 2025 11:34:08 +0900 Subject: [PATCH 3/4] =?UTF-8?q?dialog=20=EC=83=81=EB=8B=A8=20=EC=A0=9C?= =?UTF-8?q?=EB=AA=A9=20=EC=97=86=EC=9C=BC=EB=A9=B4=20=EC=A0=9C=EB=AA=A9?= =?UTF-8?q?=EC=97=86=EC=9D=B4=20=EB=AA=A8=EB=8B=AC=20=EC=B6=9C=EB=A0=A5?= =?UTF-8?q?=EB=90=98=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/dialog_ui/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 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 27c67458d..7609e2908 100644 --- a/packages/common/business_components/src/ui/dialog_ui/index.tsx +++ b/packages/common/business_components/src/ui/dialog_ui/index.tsx @@ -1,17 +1,17 @@ -import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@common/components"; +import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTrigger } from "@common/components"; type ModalType = { bodyClass: string; butNm: string; - title: string; + title: string | undefined; body: React.ReactNode; open?: boolean; onOpenChange?: (open: boolean) => void; } export function UiModal({ bodyClass, butNm, title, body, open, onOpenChange }: ModalType) { - const dialogProps = open !== undefined && onOpenChange !== undefined - ? { open, onOpenChange } + const dialogProps = open !== undefined && onOpenChange !== undefined && title !== undefined + ? { open, onOpenChange, title } : {}; return ( @@ -23,7 +23,6 @@ export function UiModal({ bodyClass, butNm, title, body, open, onOpenChange }: M - {title} @@ -37,7 +36,6 @@ export function UiModal({ bodyClass, butNm, title, body, open, onOpenChange }: M - {title} From 554ad2c5a893fde561e65e91003d1d2efa71f99c Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 28 Mar 2025 18:02:13 +0900 Subject: [PATCH 4/4] =?UTF-8?q?searInput=20=EC=98=A4=EB=A5=98=20=EC=9D=BC?= =?UTF-8?q?=EB=8B=A8=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=ED=97=A4=EB=8D=94=20=3F=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/search_input/index.tsx | 19 ++++++++++++++++--- .../src/ui/table/index.tsx | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/common/business_components/src/ui/search_input/index.tsx b/packages/common/business_components/src/ui/search_input/index.tsx index 0da6cffdc..bd634aa21 100644 --- a/packages/common/business_components/src/ui/search_input/index.tsx +++ b/packages/common/business_components/src/ui/search_input/index.tsx @@ -3,13 +3,26 @@ import React from "react"; const SearchInput = React.forwardRefvoid}>(({className, label, textValue, setText}, ref) => { const changeText=(e:React.ChangeEvent)=>{ - if(e?.target?.value) setText(e.target.value) - } + + if(e?.target?.value){ + + setText(e.target.value) + } + + + + } + + const keyUp=(e:any)=>{ + if(e.keyCode===8 && e.target.value.length==1){ + setText('') + } + } return (
{label && } - +
) }); diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index b8c2706bc..9635a7e21 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -36,7 +36,7 @@ export function UiTable({ tableData, headlist, pageSize, total, children, headNa {tableData?.map((el: { [key: string]: string | number | boolean }, index) => ( - {headlist.map((head) => ( + {headlist?.map((head) => ( cellClick && cellClick(index)} key={head.id + index}>{el[head.id]} ))}