summaryrefslogtreecommitdiff
path: root/lib/swp/table/swp-table-columns.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/swp/table/swp-table-columns.tsx')
-rw-r--r--lib/swp/table/swp-table-columns.tsx32
1 files changed, 23 insertions, 9 deletions
diff --git a/lib/swp/table/swp-table-columns.tsx b/lib/swp/table/swp-table-columns.tsx
index f79a7441..b18e2b27 100644
--- a/lib/swp/table/swp-table-columns.tsx
+++ b/lib/swp/table/swp-table-columns.tsx
@@ -3,7 +3,7 @@
import { ColumnDef } from "@tanstack/react-table";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { ChevronDown, ChevronRight, FileIcon } from "lucide-react";
+import { ChevronDown, ChevronRight, FileIcon, Download } from "lucide-react";
import { formatDistanceToNow } from "date-fns";
import { ko } from "date-fns/locale";
import type { SwpDocumentWithStats } from "../actions";
@@ -12,20 +12,16 @@ export const swpDocumentColumns: ColumnDef<SwpDocumentWithStats>[] = [
{
id: "expander",
header: () => null,
- cell: ({ row }) => {
- return row.getCanExpand() ? (
+ cell: () => {
+ return (
<Button
variant="ghost"
size="sm"
className="h-8 w-8 p-0"
>
- {row.getIsExpanded() ? (
- <ChevronDown className="h-4 w-4" />
- ) : (
- <ChevronRight className="h-4 w-4" />
- )}
+ <ChevronRight className="h-4 w-4" />
</Button>
- ) : null;
+ );
},
size: 50,
},
@@ -388,5 +384,23 @@ export const swpFileColumns: ColumnDef<FileRow>[] = [
),
size: 100,
},
+ {
+ id: "actions",
+ header: "작업",
+ cell: ({ row }) => (
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ // TODO: 파일 다운로드 로직 구현
+ console.log("Download file:", row.original.FILE_NM);
+ }}
+ >
+ <Download className="h-4 w-4 mr-1" />
+ 다운로드
+ </Button>
+ ),
+ size: 120,
+ },
];