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