feat: 템플릿 관리 페이지 생성

This commit is contained in:
2025-04-09 13:06:44 +09:00
parent dc1abe83fa
commit ec4b7db2f3
9 changed files with 254 additions and 55 deletions
@@ -0,0 +1,25 @@
import type { PageableParams, PageableList } from "@/shared/model";
export interface TemplateParams extends PageableParams {
keywordType?: string;
keyword?: string;
tmpltSeCd?: string;
useYn?: string;
}
export interface Template {
tmpltSn: number;
tmpltNm: string;
tmpltSeCd: string;
tmpltSeNm: string;
useYn: string;
mdfcnDt: string;
mdfr: string;
mdfrNm: string;
}
export type TemplateList = PageableList<Template>;
export interface TemplateService {
getTemplateList(params: TemplateParams): Promise<TemplateList>;
}
@@ -0,0 +1,35 @@
import type { ColumnDef } from "@tanstack/react-table";
import type { Template } from "./template-interface";
import dayjs from "dayjs";
export const columns: ColumnDef<Template>[] = [
{
id: "no",
header: "NO",
cell: ({ row }) => row.index + 1,
},
{
accessorKey: "tmpltNm",
header: "템플릿명",
},
{
accessorKey: "tmpltSeNm",
header: "템플릿분류",
},
{
accessorKey: "useYn",
header: "사용여부",
},
{
accessorKey: "mdfrNm",
header: "최종수정자",
},
{
accessorKey: "mdfcnDt",
header: "최종수정일",
cell: ({ row }) => {
const date = row.getValue("mdfcnDt") as string;
return date ? dayjs(date).format("YYYY-MM-DD") : "";
},
},
];