summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/table/project-detail-dialog.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-07-21 07:54:26 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-07-21 07:54:26 +0000
commit14f61e24947fb92dd71ec0a7196a6e815f8e66da (patch)
tree317c501d64662d05914330628f867467fba78132 /lib/techsales-rfq/table/project-detail-dialog.tsx
parent194bd4bd7e6144d5c09c5e3f5476d254234dce72 (diff)
(최겸)기술영업 RFQ 담당자 초대, 요구사항 반영
Diffstat (limited to 'lib/techsales-rfq/table/project-detail-dialog.tsx')
-rw-r--r--lib/techsales-rfq/table/project-detail-dialog.tsx238
1 files changed, 119 insertions, 119 deletions
diff --git a/lib/techsales-rfq/table/project-detail-dialog.tsx b/lib/techsales-rfq/table/project-detail-dialog.tsx
index 68f13960..00202501 100644
--- a/lib/techsales-rfq/table/project-detail-dialog.tsx
+++ b/lib/techsales-rfq/table/project-detail-dialog.tsx
@@ -1,120 +1,120 @@
-"use client"
-
-import * as React from "react"
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogHeader,
- DialogTitle,
-} from "@/components/ui/dialog"
-import { Badge } from "@/components/ui/badge"
-import { Button } from "@/components/ui/button"
-
-// 기본적인 RFQ 타입 정의 (rfq-table.tsx와 일치)
-interface TechSalesRfq {
- id: number
- rfqCode: string | null
- itemId: number
- itemName: string | null
- materialCode: string | null
- dueDate: Date
- rfqSendDate: Date | null
- status: "RFQ Created" | "RFQ Vendor Assignned" | "RFQ Sent" | "Quotation Analysis" | "Closed"
- picCode: string | null
- remark: string | null
- cancelReason: string | null
- createdAt: Date
- updatedAt: Date
- createdBy: number | null
- createdByName: string
- updatedBy: number | null
- updatedByName: string
- sentBy: number | null
- sentByName: string | null
- pspid: string
- projNm: string
- sector: string
- projMsrm: number
- ptypeNm: string
- attachmentCount: number
- quotationCount: number
-}
-
-interface ProjectDetailDialogProps {
- open: boolean
- onOpenChange: (open: boolean) => void
- selectedRfq: TechSalesRfq | null
-}
-
-export function ProjectDetailDialog({
- open,
- onOpenChange,
- selectedRfq,
-}: ProjectDetailDialogProps) {
- if (!selectedRfq) {
- return null
- }
-
- return (
- <Dialog open={open} onOpenChange={onOpenChange}>
- <DialogContent className="max-w-4xl w-[80vw] max-h-[80vh] overflow-hidden flex flex-col">
- <DialogHeader className="border-b pb-4">
- <DialogTitle className="flex items-center gap-2">
- 프로젝트 상세정보
- <Badge variant="outline">{selectedRfq.pspid}</Badge>
- </DialogTitle>
- <DialogDescription className="space-y-1">
- <div className="flex items-center gap-2 text-base font-medium">
- <span>RFQ:</span>
- <Badge variant="secondary">{selectedRfq.rfqCode || "미할당"}</Badge>
- <span>|</span>
- <span>자재:</span>
- <span className="text-foreground">{selectedRfq.materialCode || "N/A"}</span>
- </div>
- <div className="text-sm text-muted-foreground">
- {selectedRfq.projNm} - {selectedRfq.ptypeNm} ({selectedRfq.itemName || "자재명 없음"})
- </div>
- </DialogDescription>
- </DialogHeader>
- <div className="space-y-6 p-1 overflow-y-auto">
- {/* 기본 프로젝트 정보 */}
- <div className="space-y-4">
- <h3 className="text-lg font-semibold">기본 정보</h3>
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
- <div className="space-y-2">
- <div className="text-sm font-medium text-muted-foreground">프로젝트 ID</div>
- <div className="text-sm">{selectedRfq.pspid}</div>
- </div>
- <div className="space-y-2">
- <div className="text-sm font-medium text-muted-foreground">프로젝트명</div>
- <div className="text-sm">{selectedRfq.projNm}</div>
- </div>
- <div className="space-y-2">
- <div className="text-sm font-medium text-muted-foreground">선종</div>
- <div className="text-sm">{selectedRfq.ptypeNm}</div>
- </div>
- <div className="space-y-2">
- <div className="text-sm font-medium text-muted-foreground">척수</div>
- <div className="text-sm">{selectedRfq.projMsrm}</div>
- </div>
- <div className="space-y-2">
- <div className="text-sm font-medium text-muted-foreground">섹터</div>
- <div className="text-sm">{selectedRfq.sector}</div>
- </div>
- </div>
- </div>
- </div>
-
- {/* 닫기 버튼 */}
- <div className="sticky bottom-0 left-0 z-20 bg-background border-t pt-4 mt-4">
- <div className="flex justify-end">
- <Button variant="outline" onClick={() => onOpenChange(false)}>
- 닫기
- </Button>
- </div>
- </div>
- </DialogContent>
- </Dialog>
- )
+"use client"
+
+import * as React from "react"
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import { Badge } from "@/components/ui/badge"
+import { Button } from "@/components/ui/button"
+
+// 기본적인 RFQ 타입 정의 (rfq-table.tsx와 일치)
+interface TechSalesRfq {
+ id: number
+ rfqCode: string | null
+ itemId: number
+ itemName: string | null
+ materialCode: string | null
+ dueDate: Date
+ rfqSendDate: Date | null
+ status: "RFQ Created" | "RFQ Vendor Assignned" | "RFQ Sent" | "Quotation Analysis" | "Closed"
+ picCode: string | null
+ remark: string | null
+ cancelReason: string | null
+ createdAt: Date
+ updatedAt: Date
+ createdBy: number | null
+ createdByName: string
+ updatedBy: number | null
+ updatedByName: string
+ sentBy: number | null
+ sentByName: string | null
+ pspid: string
+ projNm: string
+ sector: string
+ projMsrm: number
+ ptypeNm: string
+ attachmentCount: number
+ quotationCount: number
+}
+
+interface ProjectDetailDialogProps {
+ open: boolean
+ onOpenChange: (open: boolean) => void
+ selectedRfq: TechSalesRfq | null
+}
+
+export function ProjectDetailDialog({
+ open,
+ onOpenChange,
+ selectedRfq,
+}: ProjectDetailDialogProps) {
+ if (!selectedRfq) {
+ return null
+ }
+
+ return (
+ <Dialog open={open} onOpenChange={onOpenChange}>
+ <DialogContent className="max-w-4xl w-[80vw] max-h-[80vh] overflow-hidden flex flex-col">
+ <DialogHeader className="border-b pb-4">
+ <DialogTitle className="flex items-center gap-2">
+ 프로젝트 상세정보
+ <Badge variant="outline">{selectedRfq.pspid}</Badge>
+ </DialogTitle>
+ <DialogDescription className="space-y-1">
+ <div className="flex items-center gap-2 text-base font-medium">
+ <span>RFQ:</span>
+ <Badge variant="secondary">{selectedRfq.rfqCode || "미할당"}</Badge>
+ <span>|</span>
+ <span>자재:</span>
+ <span className="text-foreground">{selectedRfq.materialCode || "N/A"}</span>
+ </div>
+ <div className="text-sm text-muted-foreground">
+ {selectedRfq.projNm} - {selectedRfq.ptypeNm} ({selectedRfq.itemName || "자재명 없음"})
+ </div>
+ </DialogDescription>
+ </DialogHeader>
+ <div className="space-y-6 p-1 overflow-y-auto">
+ {/* 기본 프로젝트 정보 */}
+ <div className="space-y-4">
+ <h3 className="text-lg font-semibold">기본 정보</h3>
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <div className="text-sm font-medium text-muted-foreground">프로젝트 ID</div>
+ <div className="text-sm">{selectedRfq.pspid}</div>
+ </div>
+ <div className="space-y-2">
+ <div className="text-sm font-medium text-muted-foreground">프로젝트명</div>
+ <div className="text-sm">{selectedRfq.projNm}</div>
+ </div>
+ <div className="space-y-2">
+ <div className="text-sm font-medium text-muted-foreground">선종</div>
+ <div className="text-sm">{selectedRfq.ptypeNm}</div>
+ </div>
+ <div className="space-y-2">
+ <div className="text-sm font-medium text-muted-foreground">척수</div>
+ <div className="text-sm">{selectedRfq.projMsrm}</div>
+ </div>
+ <div className="space-y-2">
+ <div className="text-sm font-medium text-muted-foreground">섹터</div>
+ <div className="text-sm">{selectedRfq.sector}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ {/* 닫기 버튼 */}
+ <div className="sticky bottom-0 left-0 z-20 bg-background border-t pt-4 mt-4">
+ <div className="flex justify-end">
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ 닫기
+ </Button>
+ </div>
+ </div>
+ </DialogContent>
+ </Dialog>
+ )
} \ No newline at end of file