From 95866a13ba4e1c235373834460aa284b763fe0d9 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 23 Jun 2025 09:03:29 +0000 Subject: (최겸) 기술영업 RFQ 개발(0620 요구사항, 첨부파일, REV 등) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/techsales-rfq/table/rfq-table-column.tsx | 99 ++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 4 deletions(-) (limited to 'lib/techsales-rfq/table/rfq-table-column.tsx') diff --git a/lib/techsales-rfq/table/rfq-table-column.tsx b/lib/techsales-rfq/table/rfq-table-column.tsx index 51c143a4..3009e036 100644 --- a/lib/techsales-rfq/table/rfq-table-column.tsx +++ b/lib/techsales-rfq/table/rfq-table-column.tsx @@ -6,13 +6,14 @@ import { formatDate, formatDateTime } from "@/lib/utils" import { Checkbox } from "@/components/ui/checkbox" import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header" import { DataTableRowAction } from "@/types/table" -import { Paperclip, Package } from "lucide-react" +import { Paperclip, Package, FileText, BarChart3 } from "lucide-react" import { Button } from "@/components/ui/button" // 기본적인 RFQ 타입 정의 (rfq-table.tsx 파일과 일치해야 함) type TechSalesRfq = { id: number rfqCode: string | null + description: string | null dueDate: Date rfqSendDate: Date | null status: "RFQ Created" | "RFQ Vendor Assignned" | "RFQ Sent" | "Quotation Analysis" | "Closed" @@ -33,6 +34,8 @@ type TechSalesRfq = { projMsrm: number ptypeNm: string attachmentCount: number + hasTbeAttachments: boolean + hasCbeAttachments: boolean quotationCount: number itemCount: number // 나머지 필드는 사용할 때마다 추가 @@ -41,7 +44,7 @@ type TechSalesRfq = { interface GetColumnsProps { setRowAction: React.Dispatch | null>>; - openAttachmentsSheet: (rfqId: number) => void; + openAttachmentsSheet: (rfqId: number, attachmentType?: 'RFQ_COMMON' | 'TBE_RESULT' | 'CBE_RESULT') => void; openItemsDialog: (rfq: TechSalesRfq) => void; } @@ -109,6 +112,18 @@ export function getColumns({ enableResizing: true, size: 120, }, + { + accessorKey: "description", + header: ({ column }) => ( + + ), + cell: ({ row }) =>
{row.getValue("description")}
, + meta: { + excelHeader: "RFQ Title" + }, + enableResizing: true, + size: 200, + }, { accessorKey: "projNm", header: ({ column }) => ( @@ -286,14 +301,14 @@ export function getColumns({ { id: "attachments", header: ({ column }) => ( - + ), cell: ({ row }) => { const rfq = row.original const attachmentCount = rfq.attachmentCount || 0 const handleClick = () => { - openAttachmentsSheet(rfq.id) + openAttachmentsSheet(rfq.id, 'RFQ_COMMON') } return ( @@ -325,5 +340,81 @@ export function getColumns({ excelHeader: "첨부파일" }, }, + { + id: "tbe-attachments", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const rfq = row.original + const hasTbeAttachments = rfq.hasTbeAttachments + + const handleClick = () => { + openAttachmentsSheet(rfq.id, 'TBE_RESULT') + } + + return ( + + ) + }, + enableSorting: false, + enableResizing: false, + size: 80, + meta: { + excelHeader: "TBE 결과" + }, + }, + { + id: "cbe-attachments", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const rfq = row.original + const hasCbeAttachments = rfq.hasCbeAttachments + + const handleClick = () => { + openAttachmentsSheet(rfq.id, 'CBE_RESULT') + } + + return ( + + ) + }, + enableSorting: false, + enableResizing: false, + size: 80, + meta: { + excelHeader: "CBE 결과" + }, + }, ] } \ No newline at end of file -- cgit v1.2.3