Files
frontend/apps/cs/src/pages/users/model/table-columns.tsx
T

61 lines
1.1 KiB
TypeScript

import dayjs from "dayjs";
import type { ColumnDef } from "@tanstack/react-table";
import type { UserListResponse } from "@/entities/user";
export const columns: ColumnDef<UserListResponse>[] = [
{
id: "no",
header: "No",
cell: ({ row }) => row.index + 1,
},
{
accessorKey: "userId",
header: "아이디",
},
{
accessorKey: "userName",
header: "이름",
},
{
accessorKey: "telno",
header: "전화번호",
},
{
accessorKey: "email",
header: "이메일",
},
{
accessorKey: "laeSeNm",
header: "구분",
},
{
accessorKey: "ogdpSeNm",
header: "소속",
},
{
accessorKey: "instSeNm",
header: "기관/부서",
},
{
accessorKey: "userStateCodeName",
header: "회원상태",
},
{
accessorKey: "aprvYmd",
header: "승인일자",
},
{
accessorKey: "loginFailCount",
header: "로그인실패횟수",
},
{
accessorKey: "lastLoginDate",
header: "최종접속일",
cell: ({ row }) => {
return row.original.lastLoginDate
? dayjs(row.original.lastLoginDate).format("YYYY-MM-DD")
: "";
},
},
];