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.tsx18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/dolce/table/file-list-columns.tsx b/lib/dolce/table/file-list-columns.tsx
index f703d56d..36a579a3 100644
--- a/lib/dolce/table/file-list-columns.tsx
+++ b/lib/dolce/table/file-list-columns.tsx
@@ -4,17 +4,20 @@ import { ColumnDef } from "@tanstack/react-table";
import { FileInfoItem } from "../actions";
import { Button } from "@/components/ui/button";
import { Download } from "lucide-react";
+import { formatDolceDateTime } from "../utils/date-formatter";
interface FileListColumnsProps {
onDownload: (file: FileInfoItem) => void;
+ lng?: string;
}
export const createFileListColumns = ({
onDownload,
+ lng = "ko",
}: FileListColumnsProps): ColumnDef<FileInfoItem>[] => [
{
accessorKey: "FileSeq",
- header: "순번",
+ header: lng === "ko" ? "순번" : "No.",
minSize: 80,
cell: ({ row }) => {
return <div className="text-center">{row.getValue("FileSeq")}</div>;
@@ -22,7 +25,7 @@ export const createFileListColumns = ({
},
{
accessorKey: "FileName",
- header: "파일명",
+ header: lng === "ko" ? "파일명" : "File Name",
minSize: 300,
cell: ({ row }) => {
return <div className="font-medium">{row.getValue("FileName")}</div>;
@@ -30,7 +33,7 @@ export const createFileListColumns = ({
},
{
accessorKey: "FileSize",
- header: "파일크기",
+ header: lng === "ko" ? "파일크기" : "File Size",
minSize: 100,
cell: ({ row }) => {
const size = parseInt(row.getValue("FileSize") as string);
@@ -43,15 +46,16 @@ export const createFileListColumns = ({
},
{
accessorKey: "CreateDt",
- header: "생성일시",
+ header: lng === "ko" ? "생성일시" : "Created Date",
minSize: 200,
cell: ({ row }) => {
- return <div className="text-sm text-muted-foreground">{row.getValue("CreateDt")}</div>;
+ const date = row.getValue("CreateDt") as string;
+ return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
},
},
{
id: "actions",
- header: "다운로드",
+ header: lng === "ko" ? "다운로드" : "Download",
minSize: 120,
cell: ({ row }) => {
return (
@@ -61,7 +65,7 @@ export const createFileListColumns = ({
onClick={() => onDownload(row.original)}
>
<Download className="h-4 w-4 mr-2" />
- 다운로드
+ {lng === "ko" ? "다운로드" : "Download"}
</Button>
);
},