Files
frontend/apps/cm/src/pages/dashboard/model/support-columns.tsx
T
2025-12-15 19:21:40 +09:00

50 lines
922 B
TypeScript

import type { ColumnDef } from "@tanstack/react-table";
import type { Support } from "../api/support-service";
const typeLabelMap: Record<string, string> = {
waterQuality: "수질",
flood: "침수",
technical: "기술지원",
};
const supportTableColumns: ColumnDef<Support>[] = [
{
accessorKey: "type",
header: "구분",
cell: ({ getValue }) => {
const value = getValue() as string;
return typeLabelMap[value] || value;
},
},
{
accessorKey: "total",
header: "합계",
},
{
accessorKey: "han",
header: "한강",
},
{
accessorKey: "nakdong",
header: "낙동강",
},
{
accessorKey: "geum",
header: "금강",
},
{
accessorKey: "youngsang",
header: "영산강",
},
{
accessorKey: "ongoing",
header: "진행중",
},
{
accessorKey: "completed",
header: "완료",
},
];
export { supportTableColumns };