From 8547034e6d82e4d1184f35af2dbff67180d89dc8 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Wed, 26 Nov 2025 18:09:18 +0900 Subject: (김준회) dolce: 동기화 기능 추가, 로컬 다운로드, 삭제 추가, 동기화 dialog 개선 등 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/dolce/table/file-list-columns.tsx | 45 ++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'lib/dolce/table/file-list-columns.tsx') diff --git a/lib/dolce/table/file-list-columns.tsx b/lib/dolce/table/file-list-columns.tsx index 36a579a3..38b1f1c9 100644 --- a/lib/dolce/table/file-list-columns.tsx +++ b/lib/dolce/table/file-list-columns.tsx @@ -3,16 +3,18 @@ import { ColumnDef } from "@tanstack/react-table"; import { FileInfoItem } from "../actions"; import { Button } from "@/components/ui/button"; -import { Download } from "lucide-react"; +import { Download, Trash2 } from "lucide-react"; import { formatDolceDateTime } from "../utils/date-formatter"; interface FileListColumnsProps { onDownload: (file: FileInfoItem) => void; + onDelete?: (file: FileInfoItem) => void; lng?: string; } export const createFileListColumns = ({ onDownload, + onDelete, lng = "ko", }: FileListColumnsProps): ColumnDef[] => [ { @@ -20,6 +22,9 @@ export const createFileListColumns = ({ header: lng === "ko" ? "순번" : "No.", minSize: 80, cell: ({ row }) => { + if (row.original.FileServerId === "LOCAL") { + return
-
; + } return
{row.getValue("FileSeq")}
; }, }, @@ -55,18 +60,36 @@ export const createFileListColumns = ({ }, { id: "actions", - header: lng === "ko" ? "다운로드" : "Download", - minSize: 120, + header: "Action", + minSize: 160, cell: ({ row }) => { + const isLocal = row.original.FileServerId === "LOCAL"; return ( - +
+ + {isLocal && onDelete && ( + + )} +
); }, }, -- cgit v1.2.3