From 4863ba5d336297dddcc8d6d4b414beceb5559742 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 8 Dec 2025 03:03:26 +0000 Subject: (최겸) 기술영업 rfq eml첨부기능 추가 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/detail-table/rfq-detail-column.tsx | 42 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'lib/techsales-rfq/table/detail-table/rfq-detail-column.tsx') diff --git a/lib/techsales-rfq/table/detail-table/rfq-detail-column.tsx b/lib/techsales-rfq/table/detail-table/rfq-detail-column.tsx index fe9befe5..d3a12385 100644 --- a/lib/techsales-rfq/table/detail-table/rfq-detail-column.tsx +++ b/lib/techsales-rfq/table/detail-table/rfq-detail-column.tsx @@ -5,7 +5,7 @@ import type { ColumnDef, Row } from "@tanstack/react-table"; import { formatDate } from "@/lib/utils" import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header" import { Checkbox } from "@/components/ui/checkbox"; -import { MessageCircle, MoreHorizontal, Trash2, Paperclip, Users } from "lucide-react"; +import { MessageCircle, MoreHorizontal, Trash2, Paperclip, Users, Mail } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { @@ -79,6 +79,7 @@ interface GetColumnsProps { onQuotationClick?: (quotationId: number) => void; // 견적 클릭 핸들러 openQuotationAttachmentsSheet?: (quotationId: number, quotationInfo: QuotationInfo) => void; // 견적서 첨부파일 sheet 열기 openContactsDialog?: (quotationId: number, vendorName?: string) => void; // 담당자 조회 다이얼로그 열기 + openEmlAttachmentsSheet?: (quotationId: number, quotationInfo: QuotationInfo) => void; // eml 첨부파일 sheet 열기 } export function getRfqDetailColumns({ @@ -86,7 +87,8 @@ export function getRfqDetailColumns({ unreadMessages = {}, onQuotationClick, openQuotationAttachmentsSheet, - openContactsDialog + openContactsDialog, + openEmlAttachmentsSheet }: GetColumnsProps): ColumnDef[] { return [ { @@ -350,6 +352,42 @@ export function getRfqDetailColumns({ enableResizing: false, size: 80, }, + { + id: "emlAttachments", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const quotation = row.original; + const handleClick = () => { + if (!openEmlAttachmentsSheet) return; + openEmlAttachmentsSheet(quotation.id, { + id: quotation.id, + quotationCode: quotation.quotationCode || null, + vendorName: quotation.vendorName || undefined, + rfqCode: quotation.rfqCode || undefined, + }); + }; + + return ( + + ); + }, + meta: { + excelHeader: "eml 첨부" + }, + enableResizing: false, + size: 80, + }, { id: "contacts", header: "담당자", -- cgit v1.2.3