import {ColumnDef} from "@tanstack/react-table"; import {Button} from "@/components/ui/button"; import {Pencil, Trash2} from "lucide-react"; import {UserTableInfo} from "@/types/user"; export type UserColumnsActions = { onEdit: (userId: string) => void onDelete: (userId: string) => void } export const getUserColumns = (actions: UserColumnsActions): ColumnDef[] => [ { accessorKey: "userId", header: "아이디", enableSorting: true, }, { accessorKey: "userCmpn", header: "소속", enableSorting: true, }, { accessorKey: "userName", header: "이름", enableSorting: true, }, { accessorKey: "userRole", header: "권한", enableSorting: true, }, { accessorKey: "regDt", header: "등록일", enableSorting: true, }, { accessorKey: "memo", header: "메모", enableSorting: false, }, { id: "actions", header: "관리", cell: ({ row }) => (
e.stopPropagation()} onPointerDown={(e) => e.stopPropagation()} >
), enableSorting: false, }, ];