"use client" import * as React from "react" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { ScrollArea } from "@/components/ui/scroll-area" import { formatDate } from "@/lib/utils" interface ProjectInfoTabProps { quotation: { id: number rfq: { id: number rfqCode: string | null materialCode: string | null dueDate: Date | null status: string | null remark: string | null biddingProject?: { id: number pspid: string | null projNm: string | null sector: string | null projMsrm: string | null ptypeNm: string | null } | null createdByUser?: { id: number name: string | null email: string | null } | null } | null vendor: { id: number vendorName: string vendorCode: string | null } | null } } export function ProjectInfoTab({ quotation }: ProjectInfoTabProps) { const rfq = quotation.rfq console.log("rfq: ", rfq) if (!rfq) { return (

RFQ 정보를 찾을 수 없습니다

연결된 RFQ 정보가 없습니다.

) } return (
{/* RFQ 기본 정보 */} RFQ 기본 정보 {rfq.rfqCode || "미할당"} 요청서 기본 정보 및 자재 정보
RFQ 번호
{rfq.rfqCode || "미할당"}
자재 그룹
{rfq.materialCode || "N/A"}
마감일
{rfq.dueDate ? formatDate(rfq.dueDate) : "N/A"}
RFQ 상태
{rfq.status || "N/A"}
담당자
{rfq.createdByUser?.name || "N/A"}
{rfq.remark && (
비고
{rfq.remark}
)}
{/* 프로젝트 기본 정보 */} {rfq.biddingProject && ( 프로젝트 기본 정보 {rfq.biddingProject.pspid || "N/A"} 연결된 프로젝트의 기본 정보
프로젝트 ID
{rfq.biddingProject.pspid || "N/A"}
프로젝트명
{rfq.biddingProject.projNm || "N/A"}
프로젝트 섹터
{rfq.biddingProject.sector || "N/A"}
프로젝트 규모
{rfq.biddingProject.projMsrm || "N/A"}
프로젝트 타입
{rfq.biddingProject.ptypeNm || "N/A"}
)}
) }