From 4ee8b24cfadf47452807fa2af801385ed60ab47c Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 15 Sep 2025 14:41:01 +0000
Subject: (대표님) 작업사항 - rfqLast, tbeLast, pdfTron, userAuth
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/tbe-last/table/session-detail-dialog.tsx | 103 +++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 lib/tbe-last/table/session-detail-dialog.tsx

(limited to 'lib/tbe-last/table/session-detail-dialog.tsx')

diff --git a/lib/tbe-last/table/session-detail-dialog.tsx b/lib/tbe-last/table/session-detail-dialog.tsx
new file mode 100644
index 00000000..ae5add41
--- /dev/null
+++ b/lib/tbe-last/table/session-detail-dialog.tsx
@@ -0,0 +1,103 @@
+// lib/tbe-last/table/dialogs/session-detail-dialog.tsx
+
+"use client"
+
+import * as React from "react"
+import { 
+  Dialog, 
+  DialogContent, 
+  DialogHeader, 
+  DialogTitle,
+  DialogDescription 
+} from "@/components/ui/dialog"
+import { Badge } from "@/components/ui/badge"
+import { formatDate } from "@/lib/utils"
+
+interface SessionDetailDialogProps {
+  open: boolean
+  onOpenChange: (open: boolean) => void
+  sessionDetail: any
+  isLoading: boolean
+}
+
+export function SessionDetailDialog({ 
+  open, 
+  onOpenChange, 
+  sessionDetail, 
+  isLoading 
+}: SessionDetailDialogProps) {
+  return (
+    <Dialog open={open} onOpenChange={onOpenChange}>
+      <DialogContent className="max-w-4xl max-h-[80vh] overflow-y-auto">
+        <DialogHeader>
+          <DialogTitle>TBE Session Detail</DialogTitle>
+          <DialogDescription>
+            {sessionDetail?.session?.sessionCode} - {sessionDetail?.session?.vendorName}
+          </DialogDescription>
+        </DialogHeader>
+        {isLoading ? (
+          <div className="p-8 text-center">Loading...</div>
+        ) : sessionDetail ? (
+          <div className="space-y-4">
+            {/* Session info */}
+            <div className="grid grid-cols-2 gap-4">
+              <div>
+                <p className="text-sm font-medium">RFQ Code</p>
+                <p className="text-sm text-muted-foreground">{sessionDetail.session.rfqCode}</p>
+              </div>
+              <div>
+                <p className="text-sm font-medium">Status</p>
+                <Badge>{sessionDetail.session.sessionStatus}</Badge>
+              </div>
+              <div>
+                <p className="text-sm font-medium">Project</p>
+                <p className="text-sm text-muted-foreground">
+                  {sessionDetail.session.projectCode} - {sessionDetail.session.projectName}
+                </p>
+              </div>
+              <div>
+                <p className="text-sm font-medium">Package</p>
+                <p className="text-sm text-muted-foreground">
+                  {sessionDetail.session.packageNo} - {sessionDetail.session.packageName}
+                </p>
+              </div>
+            </div>
+            
+            {/* PR Items */}
+            {sessionDetail.prItems?.length > 0 && (
+              <div>
+                <h3 className="font-medium mb-2">PR Items</h3>
+                <div className="border rounded-lg">
+                  <table className="w-full text-sm">
+                    <thead>
+                      <tr className="border-b">
+                        <th className="text-left p-2">PR No</th>
+                        <th className="text-left p-2">Material Code</th>
+                        <th className="text-left p-2">Description</th>
+                        <th className="text-left p-2">Qty</th>
+                        <th className="text-left p-2">Delivery</th>
+                      </tr>
+                    </thead>
+                    <tbody>
+                      {sessionDetail.prItems.map((item: any) => (
+                        <tr key={item.id} className="border-b">
+                          <td className="p-2">{item.prNo}</td>
+                          <td className="p-2">{item.materialCode}</td>
+                          <td className="p-2">{item.materialDescription}</td>
+                          <td className="p-2">{item.quantity} {item.uom}</td>
+                          <td className="p-2">
+                            {item.deliveryDate ? formatDate(item.deliveryDate, "KR") : "-"}
+                          </td>
+                        </tr>
+                      ))}
+                    </tbody>
+                  </table>
+                </div>
+              </div>
+            )}
+          </div>
+        ) : null}
+      </DialogContent>
+    </Dialog>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

