summaryrefslogtreecommitdiff
path: root/lib/dolce/table/file-list-columns.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dolce/table/file-list-columns.tsx')
-rw-r--r--lib/dolce/table/file-list-columns.tsx64
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>;
+ },
+ },
+
];