40 lines
1017 B
TypeScript
40 lines
1017 B
TypeScript
import dayjs from "dayjs";
|
|
import type { ColumnDef } from "@tanstack/react-table";
|
|
import { Checkbox } from "@common/components/ui";
|
|
import type { SearchUser } from "@/entities/user-organization";
|
|
|
|
export const columns: ColumnDef<SearchUser>[] = [
|
|
{
|
|
id: "select",
|
|
header: ({ table }) => (
|
|
<Checkbox
|
|
checked={table.getIsAllPageRowsSelected()}
|
|
onCheckedChange={(checked) =>
|
|
table.toggleAllPageRowsSelected(!!checked)
|
|
}
|
|
className="h-4 w-4 rounded border-gray-300"
|
|
/>
|
|
),
|
|
cell: ({ row }) => (
|
|
<Checkbox
|
|
checked={row.getIsSelected()}
|
|
onCheckedChange={(checked) => row.toggleSelected(!!checked)}
|
|
className="h-4 w-4 rounded border-gray-300"
|
|
/>
|
|
),
|
|
},
|
|
{
|
|
accessorKey: "userNm",
|
|
header: "이름",
|
|
},
|
|
{
|
|
accessorKey: "ogdpSeNm",
|
|
header: "소속",
|
|
},
|
|
{
|
|
accessorKey: "regDt",
|
|
header: "등록일",
|
|
cell: ({ row }) => dayjs(row.original.regDt).format("YYYY-MM-DD HH:mm:ss"),
|
|
},
|
|
];
|