"use client" import * as React from "react" import { Dialog, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog" import { Badge } from "@/components/ui/badge" import { formatDateTime } from "@/lib/utils" import { CalendarClock } from "lucide-react" import { RfqItemsTable } from "../vendor-cbe-table/rfq-items-table/rfq-items-table" import { TbeVendorFields } from "@/config/vendorTbeColumnsConfig" interface RfqDeailDialogProps { isOpen: boolean onOpenChange: (open: boolean) => void rfqId: number | null rfq: TbeVendorFields | null } export function RfqDeailDialog({ isOpen, onOpenChange, rfqId, rfq, }: RfqDeailDialogProps) { return (
{rfq && rfq.rfqCode} Detail {rfq && (
{rfq.rfqDescription && rfq.rfqDescription}
{/* 정보를 두 행으로 나누어 표시 */}
{/* 첫 번째 행: 상태 배지 */}
{rfq.vendorStatus && ( {rfq.rfqStatus} )} {rfq.rfqType && ( {rfq.rfqType} )}
{/* 두 번째 행: Due Date를 강조 표시 */} {rfq.rfqDueDate && (
Due Date: {formatDateTime(rfq.rfqDueDate)}
)}
)}
{rfqId && (
)}
) }