"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.
)}
) }