From 5036cf2908792cef45f06256e71f10920f647f49 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 28 May 2025 19:03:21 +0000 Subject: (김준회) 기술영업 조선 RFQ (SHI/벤더) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendor-response/detail/project-info-tab.tsx | 269 +++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx (limited to 'lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx') diff --git a/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx new file mode 100644 index 00000000..7ba3320d --- /dev/null +++ b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx @@ -0,0 +1,269 @@ +"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 { formatDateToQuarter, formatDate } from "@/lib/utils" + +interface ProjectSnapshot { + pspid?: string + projNm?: string + projMsrm?: number + kunnr?: string + kunnrNm?: string + cls1?: string + cls1Nm?: string + ptype?: string + ptypeNm?: string + estmPm?: string + scDt?: string + klDt?: string + lcDt?: string + dlDt?: string + dockNo?: string + dockNm?: string + projNo?: string + ownerNm?: string + pspUpdatedAt?: string | Date +} + +interface SeriesSnapshot { + sersNo?: string + klDt?: string +} + +interface ProjectInfoTabProps { + quotation: { + id: number + rfq: { + id: number + rfqCode: string | null + materialCode: string | null + dueDate: Date | null + status: string | null + remark: string | null + projectSnapshot?: ProjectSnapshot | null + seriesSnapshot?: SeriesSnapshot[] | null + item?: { + id: number + itemCode: string | null + itemName: string | null + } | null + biddingProject?: { + id: number + pspid: string | null + projNm: 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 + const projectSnapshot = rfq?.projectSnapshot + const seriesSnapshot = rfq?.seriesSnapshot + + if (!rfq) { + return ( +
+
+

RFQ 정보를 찾을 수 없습니다

+

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

+
+
+ ) + } + + return ( + +
+ {/* RFQ 기본 정보 */} + + + + RFQ 기본 정보 + {rfq.rfqCode || "미할당"} + + + 요청서 기본 정보 및 자재 정보 + + + +
+
+
RFQ 번호
+
{rfq.rfqCode || "미할당"}
+
+
+
자재 코드
+
{rfq.materialCode || "N/A"}
+
+
+
품목명
+
{rfq.item?.itemName || "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"}
+
+
+
+
+ )} + + {/* 프로젝트 스냅샷 정보 */} + {projectSnapshot && ( + + + 프로젝트 스냅샷 + + RFQ 생성 시점의 프로젝트 상세 정보 + + + +
+ {projectSnapshot.projNo && ( +
+
공사번호
+
{projectSnapshot.projNo}
+
+ )} + {projectSnapshot.projNm && ( +
+
공사명
+
{projectSnapshot.projNm}
+
+ )} + {projectSnapshot.estmPm && ( +
+
견적 PM
+
{projectSnapshot.estmPm}
+
+ )} + {projectSnapshot.kunnrNm && ( +
+
선주
+
{projectSnapshot.kunnrNm}
+
+ )} + {projectSnapshot.cls1Nm && ( +
+
선급
+
{projectSnapshot.cls1Nm}
+
+ )} + {projectSnapshot.projMsrm && ( +
+
척수
+
{projectSnapshot.projMsrm}
+
+ )} + {projectSnapshot.ptypeNm && ( +
+
선종
+
{projectSnapshot.ptypeNm}
+
+ )} +
+
+
+ )} + + {/* 시리즈 스냅샷 정보 */} + {seriesSnapshot && Array.isArray(seriesSnapshot) && seriesSnapshot.length > 0 && ( + + + 시리즈 정보 스냅샷 + + 프로젝트의 시리즈별 K/L 일정 정보 + + + + {seriesSnapshot.map((series: SeriesSnapshot, index: number) => ( +
+
+ 시리즈 {series.sersNo || index + 1} +
+
+ {series.klDt && ( +
+
K/L
+
{formatDateToQuarter(series.klDt)}
+
+ )} +
+
+ ))} +
+
+ )} + + {/* 정보가 없는 경우 */} + {!projectSnapshot && !seriesSnapshot && ( + + +
+ 추가 프로젝트 상세정보가 없습니다. +
+
+
+ )} +
+
+ ) +} \ No newline at end of file -- cgit v1.2.3