59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
import dayjs from "dayjs";
|
|
import { type ColumnDef } from "@tanstack/react-table";
|
|
import type { Authorizations } from "./authorizations-interface";
|
|
import { ManagementAuthorityDialog } from "../ui/management-authority-dialog";
|
|
|
|
export const columns: ColumnDef<Authorizations>[] = [
|
|
{
|
|
id: "no",
|
|
header: "NO",
|
|
cell: ({ row }) => row.index + 1,
|
|
},
|
|
{
|
|
accessorKey: "authorizationName",
|
|
header: "API명",
|
|
},
|
|
{
|
|
accessorKey: "urlPatternValue",
|
|
header: "API URL",
|
|
},
|
|
{
|
|
accessorKey: "httpMethodCode",
|
|
header: "요청 메소드",
|
|
},
|
|
{
|
|
accessorKey: "useYn",
|
|
header: "사용여부",
|
|
},
|
|
{
|
|
accessorKey: "mdfr",
|
|
header: "최종수정자",
|
|
},
|
|
{
|
|
accessorKey: "mdfcnDt",
|
|
header: "최종수정일",
|
|
cell: ({ row }) => {
|
|
const date = dayjs(row.original.mdfcnDt);
|
|
return date.format("YYYY-MM-DD");
|
|
},
|
|
},
|
|
{
|
|
id: "action",
|
|
header: "권한관리",
|
|
cell: ({ row }) => {
|
|
return (
|
|
<div
|
|
onClick={(e) => {
|
|
e.stopPropagation();
|
|
}}
|
|
>
|
|
<ManagementAuthorityDialog
|
|
authorizationNo={row.original.authorizationNo.toString()}
|
|
rowData={row.original}
|
|
/>
|
|
</div>
|
|
);
|
|
},
|
|
},
|
|
];
|