From 5036cf2908792cef45f06256e71f10920f647f49 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
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/quotation-tabs.tsx      | 118 +++++++++++++++++++++
 1 file changed, 118 insertions(+)
 create mode 100644 lib/techsales-rfq/vendor-response/detail/quotation-tabs.tsx

(limited to 'lib/techsales-rfq/vendor-response/detail/quotation-tabs.tsx')

diff --git a/lib/techsales-rfq/vendor-response/detail/quotation-tabs.tsx b/lib/techsales-rfq/vendor-response/detail/quotation-tabs.tsx
new file mode 100644
index 00000000..a800dd95
--- /dev/null
+++ b/lib/techsales-rfq/vendor-response/detail/quotation-tabs.tsx
@@ -0,0 +1,118 @@
+"use client"
+
+import * as React from "react"
+import { useRouter, useSearchParams } from "next/navigation"
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
+import { ProjectInfoTab } from "./project-info-tab"
+import { QuotationResponseTab } from "./quotation-response-tab"
+import { CommunicationTab } from "./communication-tab"
+
+// 프로젝트 스냅샷 타입 정의
+interface ProjectSnapshot {
+  scDt?: string
+  klDt?: string
+  lcDt?: string
+  dlDt?: string
+  dockNo?: string
+  dockNm?: string
+  projNo?: string
+  projNm?: string
+  ownerNm?: string
+  kunnrNm?: string
+  cls1Nm?: string
+  projMsrm?: number
+  ptypeNm?: string
+  sector?: string
+  estmPm?: string
+}
+
+// 시리즈 스냅샷 타입 정의
+interface SeriesSnapshot {
+  sersNo?: string
+  scDt?: string
+  klDt?: string
+  lcDt?: string
+  dlDt?: string
+  dockNo?: string
+  dockNm?: string
+}
+
+interface QuotationData {
+  id: number
+  status: string
+  totalPrice: string | null
+  currency: string | null
+  validUntil: Date | null
+  remark: string | null
+  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
+}
+
+interface TechSalesQuotationTabsProps {
+  quotation: QuotationData
+  defaultTab?: string
+}
+
+export function TechSalesQuotationTabs({ quotation, defaultTab = "project" }: TechSalesQuotationTabsProps) {
+  const router = useRouter()
+  const searchParams = useSearchParams()
+  const currentTab = searchParams?.get("tab") || defaultTab
+
+  const handleTabChange = (value: string) => {
+    const params = new URLSearchParams(searchParams?.toString() || "")
+    params.set("tab", value)
+    router.push(`?${params.toString()}`, { scroll: false })
+  }
+
+  return (
+    <Tabs value={currentTab} onValueChange={handleTabChange} className="h-full flex flex-col">
+      <TabsList className="grid w-full grid-cols-3">
+        <TabsTrigger value="project">프로젝트 및 RFQ 정보</TabsTrigger>
+        <TabsTrigger value="quotation">견적 응답</TabsTrigger>
+        <TabsTrigger value="communication">커뮤니케이션</TabsTrigger>
+      </TabsList>
+      
+      <div className="flex-1 mt-4 overflow-hidden">
+        <TabsContent value="project" className="h-full m-0">
+          <ProjectInfoTab quotation={quotation} />
+        </TabsContent>
+        
+        <TabsContent value="quotation" className="h-full m-0">
+          <QuotationResponseTab quotation={quotation} />
+        </TabsContent>
+        
+        <TabsContent value="communication" className="h-full m-0">
+          <CommunicationTab quotation={quotation} />
+        </TabsContent>
+      </div>
+    </Tabs>
+  )
+} 
\ No newline at end of file
-- 
cgit v1.2.3

