From 8238c0c0ed6fd182d33f3437a22da1d80cfa928f Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 24 Nov 2025 10:47:34 +0000 Subject: (임수민) 법무검토 요청 데이터 조회 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/legal/sslvw-pur-inq-req-dialog.tsx | 41 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'components') diff --git a/components/common/legal/sslvw-pur-inq-req-dialog.tsx b/components/common/legal/sslvw-pur-inq-req-dialog.tsx index 42f987fb..7c2ec349 100644 --- a/components/common/legal/sslvw-pur-inq-req-dialog.tsx +++ b/components/common/legal/sslvw-pur-inq-req-dialog.tsx @@ -38,9 +38,17 @@ import { SSLVWPurInqReq } from "@/lib/basic-contract/sslvw-service" interface SSLVWPurInqReqDialogProps { onConfirm?: (selectedRows: SSLVWPurInqReq[]) => void + requireSingleSelection?: boolean + triggerDisabled?: boolean + triggerTitle?: string } -export function SSLVWPurInqReqDialog({ onConfirm }: SSLVWPurInqReqDialogProps) { +export function SSLVWPurInqReqDialog({ + onConfirm, + requireSingleSelection = false, + triggerDisabled = false, + triggerTitle, +}: SSLVWPurInqReqDialogProps) { const [open, setOpen] = React.useState(false) const [isLoading, setIsLoading] = React.useState(false) const [data, setData] = React.useState([]) @@ -144,9 +152,18 @@ export function SSLVWPurInqReqDialog({ onConfirm }: SSLVWPurInqReqDialogProps) { return } + if (requireSingleSelection && selectedRows.length !== 1) { + toast.error("하나의 행만 선택해주세요.") + return + } + if (onConfirm) { onConfirm(selectedRows) - toast.success(`${selectedRows.length}개의 행을 선택했습니다.`) + toast.success( + requireSingleSelection + ? "선택한 행으로 법무 상태를 동기화합니다." + : `${selectedRows.length}개의 행을 선택했습니다.` + ) } else { // 임시로 선택된 데이터 콘솔 출력 console.log("선택된 행들:", selectedRows) @@ -159,7 +176,12 @@ export function SSLVWPurInqReqDialog({ onConfirm }: SSLVWPurInqReqDialogProps) { return ( - @@ -314,7 +336,7 @@ export function SSLVWPurInqReqDialog({ onConfirm }: SSLVWPurInqReqDialogProps) { - {/* */} - + -- cgit v1.2.3