From b8e8328b1ffffb80bf4ebb776a4a24e5680fc5bc Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 28 Mar 2025 00:42:08 +0000 Subject: 테이블 칼럼 리사이즈 및 핀 충돌 해결 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/po/table/esign-dialog.tsx | 112 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 lib/po/table/esign-dialog.tsx (limited to 'lib/po/table/esign-dialog.tsx') diff --git a/lib/po/table/esign-dialog.tsx b/lib/po/table/esign-dialog.tsx new file mode 100644 index 00000000..ee517a4a --- /dev/null +++ b/lib/po/table/esign-dialog.tsx @@ -0,0 +1,112 @@ +"use client" + +import * as React from "react" +import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from "@/components/ui/dialog" +import { Button } from "@/components/ui/button" +import { ScrollArea } from "@/components/ui/scroll-area" +import { Separator } from "@/components/ui/separator" +import { Badge } from "@/components/ui/badge" +// import { PenIcon, InfoIcon } from "lucide-react" // 필요하다면 + +import type { ContractDetailParsed } from "@/db/schema/contract" + +/** + * E-sign Status Dialog Props + */ +interface EsignStatusDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; + po: ContractDetailParsed | null; // 실제로 표시할 계약 데이터 +} + +export function EsignStatusDialog({ + open, + onOpenChange, + po, +}: EsignStatusDialogProps) { + console.log(open) + console.log(po) + return ( + + + + Electronic Signature Status + + {po + ? `Check the e-sign envelopes and signers for contract #${po.contractNo}.` + : "No contract selected." + } + + + + {/* 본문 영역 */} + {po ? ( + po.envelopes.length === 0 ? ( +
+ No e-sign envelopes found for this contract. +
+ ) : ( + + {po.envelopes.map((envelope, idx) => { + return ( +
+ {/* Envelope Header */} +
+ + Envelope #{envelope.id} + + + {envelope.envelopeStatus} + +
+
+ Updated at: {envelope.updatedAt} +
+ + {/* Signers */} + + {envelope.signers && envelope.signers.length > 0 ? ( +
+ {envelope.signers.map((signer) => ( +
+
+ + {signer.signerName} ({signer.signerEmail}) + + + {signer.signerStatus} + +
+ {signer.signedAt && ( +
+ Signed at: {signer.signedAt} +
+ )} +
+ ))} +
+ ) : ( +
+ No signers found. +
+ )} +
+ ) + })} +
+ ) + ) : ( +
+ Please select a contract to see its e-sign status. +
+ )} + + + + +
+
+ ) +} \ No newline at end of file -- cgit v1.2.3