diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-27 15:11:02 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-27 15:11:02 +0900 |
| commit | 647e2e487238aed36ff9a880648e5c3e8725160f (patch) | |
| tree | 85b39b6c9d525f48bedd2ed45d3b27a1eefde4c9 /lib/dolce/table/file-list-columns.tsx | |
| parent | b43b1d92ef3d7e57b5df5cd72f75dc3a1c3f1c7a (diff) | |
(김준회) dolce 컬럼 조정
Diffstat (limited to 'lib/dolce/table/file-list-columns.tsx')
| -rw-r--r-- | lib/dolce/table/file-list-columns.tsx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lib/dolce/table/file-list-columns.tsx b/lib/dolce/table/file-list-columns.tsx index 3018e240..e21f4382 100644 --- a/lib/dolce/table/file-list-columns.tsx +++ b/lib/dolce/table/file-list-columns.tsx @@ -31,39 +31,9 @@ export const createFileListColumns = ({ }, }, { - accessorKey: "FileName", - header: lng === "ko" ? "파일명" : "File Name", - minSize: 300, - cell: ({ row }) => { - return <div className="font-medium">{row.getValue("FileName")}</div>; - }, - }, - { - accessorKey: "FileSize", - header: lng === "ko" ? "파일크기" : "File Size", - minSize: 100, - cell: ({ row }) => { - const size = parseInt(row.getValue("FileSize") as string); - if (isNaN(size) || size === 0) return "-"; - - if (size < 1024) return `${size} B`; - if (size < 1024 * 1024) return `${(size / 1024).toFixed(2)} KB`; - return `${(size / (1024 * 1024)).toFixed(2)} MB`; - }, - }, - { - accessorKey: "CreateDt", - header: lng === "ko" ? "생성일시" : "Created Date", - minSize: 200, - cell: ({ row }) => { - const date = row.getValue("CreateDt") as string; - return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>; - }, - }, - { id: "actions", header: "Action", - minSize: 160, + minSize: 50, cell: ({ row }) => { const isLocal = row.original.FileServerId === "LOCAL"; const isDownloading = downloadingFileId === row.original.FileId; @@ -84,7 +54,6 @@ export const createFileListColumns = ({ ) : ( <Download className="h-4 w-4 mr-2" /> )} - {lng === "ko" ? "다운로드" : "Download"} </Button> {isLocal && onDelete && ( <Button @@ -103,5 +72,36 @@ export const createFileListColumns = ({ ); }, }, + { + accessorKey: "FileName", + header: lng === "ko" ? "파일명" : "File Name", + minSize: 300, + cell: ({ row }) => { + return <div className="font-medium">{row.getValue("FileName")}</div>; + }, + }, + { + accessorKey: "FileSize", + header: lng === "ko" ? "파일크기" : "File Size", + minSize: 100, + cell: ({ row }) => { + const size = parseInt(row.getValue("FileSize") as string); + if (isNaN(size) || size === 0) return "-"; + + if (size < 1024) return `${size} B`; + if (size < 1024 * 1024) return `${(size / 1024).toFixed(2)} KB`; + return `${(size / (1024 * 1024)).toFixed(2)} MB`; + }, + }, + { + accessorKey: "CreateDt", + header: lng === "ko" ? "생성일시" : "Created Date", + minSize: 250, + cell: ({ row }) => { + const date = row.getValue("CreateDt") as string; + return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>; + }, + }, + ]; |
