diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-15 04:40:22 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-15 04:40:22 +0000 |
| commit | c5002d77087b256599b174ada611621657fcc523 (patch) | |
| tree | 515aab399709755cf3d57d9927e2d81467dea700 /lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx | |
| parent | 9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 (diff) | |
(최겸) 기술영업 조선,해양RFQ 수정
Diffstat (limited to 'lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx')
| -rw-r--r-- | lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx | 157 |
1 files changed, 17 insertions, 140 deletions
diff --git a/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx index e4b1b8c3..a8f44474 100644 --- a/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx +++ b/lib/techsales-rfq/vendor-response/detail/project-info-tab.tsx @@ -4,34 +4,7 @@ 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 -} +import { formatDate } from "@/lib/utils" interface ProjectInfoTabProps { quotation: { @@ -43,17 +16,13 @@ interface ProjectInfoTabProps { dueDate: Date | null status: string | null remark: string | null - projectSnapshot?: ProjectSnapshot | null - seriesSnapshot?: SeriesSnapshot[] | null - item?: { - id: number - itemCode: string | null - itemList: string | null - } | null biddingProject?: { id: number pspid: string | null projNm: string | null + sector: string | null + projMsrm: string | null + ptypeNm: string | null } | null createdByUser?: { id: number @@ -71,8 +40,6 @@ interface ProjectInfoTabProps { export function ProjectInfoTab({ quotation }: ProjectInfoTabProps) { const rfq = quotation.rfq - const projectSnapshot = rfq?.projectSnapshot - const seriesSnapshot = rfq?.seriesSnapshot console.log("rfq: ", rfq) @@ -110,15 +77,10 @@ export function ProjectInfoTab({ quotation }: ProjectInfoTabProps) { <div className="text-sm">{rfq.rfqCode || "미할당"}</div> </div> <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">자재 코드</div> + <div className="text-sm font-medium text-muted-foreground">자재 그룹</div> <div className="text-sm">{rfq.materialCode || "N/A"}</div> </div> <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">자재명</div> - {/* TODO : 타입 작업 (시연을 위해 빌드 중단 상태임. 추후 수정) */} - <div className="text-sm"><strong>{rfq.itemShipbuilding?.itemList || "N/A"}</strong></div> - </div> - <div className="space-y-2"> <div className="text-sm font-medium text-muted-foreground">마감일</div> <div className="text-sm"> {rfq.dueDate ? formatDate(rfq.dueDate) : "N/A"} @@ -164,108 +126,23 @@ export function ProjectInfoTab({ quotation }: ProjectInfoTabProps) { <div className="text-sm font-medium text-muted-foreground">프로젝트명</div> <div className="text-sm">{rfq.biddingProject.projNm || "N/A"}</div> </div> - </div> - </CardContent> - </Card> - )} - - {/* 프로젝트 스냅샷 정보 */} - {projectSnapshot && ( - <Card> - <CardHeader> - <CardTitle>프로젝트 스냅샷</CardTitle> - <CardDescription> - RFQ 생성 시점의 프로젝트 상세 정보 - </CardDescription> - </CardHeader> - <CardContent className="space-y-4"> - <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> - {projectSnapshot.projNo && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">공사번호</div> - <div className="text-sm">{projectSnapshot.projNo}</div> - </div> - )} - {projectSnapshot.projNm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">공사명</div> - <div className="text-sm">{projectSnapshot.projNm}</div> - </div> - )} - {projectSnapshot.estmPm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">견적 PM</div> - <div className="text-sm">{projectSnapshot.estmPm}</div> - </div> - )} - {projectSnapshot.kunnrNm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">선주</div> - <div className="text-sm">{projectSnapshot.kunnrNm}</div> - </div> - )} - {projectSnapshot.cls1Nm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">선급</div> - <div className="text-sm">{projectSnapshot.cls1Nm}</div> - </div> - )} - {projectSnapshot.projMsrm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">척수</div> - <div className="text-sm">{projectSnapshot.projMsrm}</div> - </div> - )} - {projectSnapshot.ptypeNm && ( - <div className="space-y-2"> - <div className="text-sm font-medium text-muted-foreground">선종</div> - <div className="text-sm">{projectSnapshot.ptypeNm}</div> - </div> - )} - </div> - </CardContent> - </Card> - )} - - {/* 시리즈 스냅샷 정보 */} - {seriesSnapshot && Array.isArray(seriesSnapshot) && seriesSnapshot.length > 0 && ( - <Card> - <CardHeader> - <CardTitle>시리즈 정보 스냅샷</CardTitle> - <CardDescription> - 프로젝트의 시리즈별 K/L 일정 정보 - </CardDescription> - </CardHeader> - <CardContent className="space-y-4"> - {seriesSnapshot.map((series: SeriesSnapshot, index: number) => ( - <div key={index} className="border rounded-lg p-4 space-y-3"> - <div className="flex items-center gap-2"> - <Badge variant="secondary">시리즈 {series.sersNo || index + 1}</Badge> - </div> - <div className="grid grid-cols-1 md:grid-cols-2 gap-4"> - {series.klDt && ( - <div className="space-y-1"> - <div className="text-xs font-medium text-muted-foreground">K/L</div> - <div className="text-sm">{formatDateToQuarter(series.klDt)}</div> - </div> - )} - </div> + <div className="space-y-2"> + <div className="text-sm font-medium text-muted-foreground">프로젝트 섹터</div> + <div className="text-sm">{rfq.biddingProject.sector || "N/A"}</div> + </div> + <div className="space-y-2"> + <div className="text-sm font-medium text-muted-foreground">프로젝트 규모</div> + <div className="text-sm">{rfq.biddingProject.projMsrm || "N/A"}</div> + </div> + <div className="space-y-2"> + <div className="text-sm font-medium text-muted-foreground">프로젝트 타입</div> + <div className="text-sm">{rfq.biddingProject.ptypeNm || "N/A"}</div> </div> - ))} - </CardContent> - </Card> - )} - - {/* 정보가 없는 경우 */} - {!projectSnapshot && !seriesSnapshot && ( - <Card> - <CardContent className="text-center py-8"> - <div className="text-muted-foreground"> - 추가 프로젝트 상세정보가 없습니다. </div> </CardContent> </Card> )} + </div> </ScrollArea> ) |
