From 44b74ff4170090673b6eeacd8c528e0abf47b7aa Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 1 Dec 2025 19:52:06 +0900 Subject: (김준회) deprecated code 정리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/b-rfq/attachment/attachment-columns.tsx | 286 ---------------------------- 1 file changed, 286 deletions(-) delete mode 100644 lib/b-rfq/attachment/attachment-columns.tsx (limited to 'lib/b-rfq/attachment/attachment-columns.tsx') diff --git a/lib/b-rfq/attachment/attachment-columns.tsx b/lib/b-rfq/attachment/attachment-columns.tsx deleted file mode 100644 index b726ebc8..00000000 --- a/lib/b-rfq/attachment/attachment-columns.tsx +++ /dev/null @@ -1,286 +0,0 @@ -"use client" - -import * as React from "react" -import { type ColumnDef } from "@tanstack/react-table" -import { - Ellipsis, FileText, Download, Eye, - MessageSquare, Upload -} from "lucide-react" - -import { formatDate, formatBytes } from "@/lib/utils" -import { Badge } from "@/components/ui/badge" -import { Button } from "@/components/ui/button" -import { Checkbox } from "@/components/ui/checkbox" -import { - DropdownMenu, DropdownMenuContent, DropdownMenuItem, - DropdownMenuSeparator, DropdownMenuTrigger -} from "@/components/ui/dropdown-menu" -import { Progress } from "@/components/ui/progress" -import { RevisionDialog } from "./revision-dialog" -import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header" -import { AddRevisionDialog } from "./add-revision-dialog" - -interface GetAttachmentColumnsProps { - onSelectAttachment: (attachment: any) => void -} - -export function getAttachmentColumns({ - onSelectAttachment -}: GetAttachmentColumnsProps): ColumnDef[] { - - return [ - /** ───────────── 체크박스 ───────────── */ - { - id: "select", - header: ({ table }) => ( - table.toggleAllPageRowsSelected(!!value)} - aria-label="Select all" - className="translate-y-0.5" - /> - ), - cell: ({ row }) => ( - row.toggleSelected(!!value)} - aria-label="Select row" - className="translate-y-0.5" - /> - ), - size: 40, - enableSorting: false, - enableHiding: false, - }, - - /** ───────────── 문서 정보 ───────────── */ - { - accessorKey: "serialNo", - header: ({ column }) => ( - - ), - cell: ({ row }) => ( - - ), - size: 100, - }, - { - accessorKey: "attachmentType", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const type = row.getValue("attachmentType") as string - return ( - - {type} - - ) - }, - size:100 - }, - { - accessorKey: "originalFileName", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const fileName = row.getValue("originalFileName") as string - return ( -
- -
-
- {fileName} -
-
-
- ) - }, - size:250 - }, - { - id: "currentRevision", - header: ({ column }) => ( - - ), - cell: ({ row }) => ( - - ), - size: 100, - }, - { - accessorKey: "description", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const description = row.getValue("description") as string - return description - ?
{description}
- : - - }, - }, - - /** ───────────── 파일 정보 ───────────── */ - // { - // accessorKey: "fileSize", - // header: ({ column }) => ( - // - // ), - // cell: ({ row }) => { - // const size = row.getValue("fileSize") as number - // return size ? formatBytes(size) : "-" - // }, - // }, - { - accessorKey: "createdAt", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const created = row.getValue("createdAt") as Date - const updated = row.original.updatedAt as Date - return ( -
-
{formatDate(created, "KR")}
-
- {row.original.createdByName} -
- {updated && new Date(updated) > new Date(created) && ( -
- 수정: {formatDate(updated, "KR")} -
- )} -
- ) - }, - maxSize:150 - }, - - /** ───────────── 벤더 응답 현황 ───────────── */ - { - id: "vendorCount", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const stats = row.original.responseStats - return stats - ? ( -
-
{stats.totalVendors}
-
- 활성: {stats.totalVendors - stats.waivedCount} -
-
- ) - : - - }, - }, - { - id: "responseStatus", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const stats = row.original.responseStats - return stats - ? ( -
-
-
- -
- - {stats.responseRate}% - -
-
- - 응답: {stats.respondedCount} - - - 대기: {stats.pendingCount} - - {stats.waivedCount > 0 && ( - - 면제: {stats.waivedCount} - - )} -
-
- ) - : - - }, - }, - - /** ───────────── 액션 ───────────── */ - { - id: "actions", - enableHiding: false, - cell: ({ row }) => { - const [isAddRevisionOpen, setIsAddRevisionOpen] = React.useState(false) - - return ( - <> - - - - - - onSelectAttachment(row.original)}> - - 벤더 응답 보기 - - row.original.filePath && window.open(row.original.filePath, "_blank")} - > - - 다운로드 - - - setIsAddRevisionOpen(true)}> - - 새 리비전 추가 - - - 삭제 - - - - - window.location.reload()} - /> - - ) - }, - size: 40, - }, - ] -} -- cgit v1.2.3