diff options
| author | joonhoekim <26rote@gmail.com> | 2025-09-15 18:58:07 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-09-15 18:58:07 +0900 |
| commit | 2b490956c9752c1b756780a3461bc1c37b6fe0a7 (patch) | |
| tree | b0b8a03c8de5dfce4b6c7373a9d608306e9147c0 /lib/avl/table/avl-table-columns.tsx | |
| parent | e7818a457371849e29519497ebf046f385f05ab6 (diff) | |
(김준회) AVL 관리 및 상세 - 기능 구현 1차
+ docker compose 내 오류 수정
Diffstat (limited to 'lib/avl/table/avl-table-columns.tsx')
| -rw-r--r-- | lib/avl/table/avl-table-columns.tsx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/avl/table/avl-table-columns.tsx b/lib/avl/table/avl-table-columns.tsx index 77361f36..8caf012e 100644 --- a/lib/avl/table/avl-table-columns.tsx +++ b/lib/avl/table/avl-table-columns.tsx @@ -1,7 +1,7 @@ import { Checkbox } from "@/components/ui/checkbox" import { Button } from "@/components/ui/button" import { Badge } from "@/components/ui/badge" -import { Eye, Edit, Trash2 } from "lucide-react" +import { Eye, Edit, Trash2, History } from "lucide-react" import { type ColumnDef, TableMeta } from "@tanstack/react-table" import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header" import { EditableCell } from "@/components/data-table/editable-cell" @@ -224,22 +224,24 @@ export function getColumns({ selectedRows = [], onRowSelect }: GetColumnsProps): ), cell: ({ getValue, row, table }) => { const value = getValue() as number - const isModified = getIsModified(table, row.id, "rev") return ( - <EditableCell - value={value?.toString() || ""} - isModified={isModified} - type="number" - onUpdate={(newValue) => { - table.options.meta?.onCellUpdate?.(row.id, "rev", parseInt(newValue)) - }} - onCancel={() => { - table.options.meta?.onCellCancel?.(row.id, "rev") - }} - /> + <div className="flex items-center gap-1"> + <Badge variant="outline" className="font-mono"> + {value || 1} + </Badge> + <Button + variant="ghost" + size="sm" + className="h-6 w-6 p-0" + onClick={() => table.options.meta?.onAction?.('view-history', row.original)} + title="리비전 히스토리 보기" + > + <History className="h-3 w-3" /> + </Button> + </div> ) }, - size: 80, + size: 100, }, ], }, |
