diff --git a/src/app/(pages)/(main)/safety-inspection/sub/SafetyInspectionTotal.tsx b/src/app/(pages)/(main)/safety-inspection/sub/SafetyInspectionTotal.tsx index baa222d..dd83aae 100644 --- a/src/app/(pages)/(main)/safety-inspection/sub/SafetyInspectionTotal.tsx +++ b/src/app/(pages)/(main)/safety-inspection/sub/SafetyInspectionTotal.tsx @@ -10,6 +10,7 @@ import type { CsiData, CsiDataMap } from "@/types/kfpa"; import VerticalBar from "@/components/chart/VerticalBar"; import {SignStyle} from "@/components/table/types"; import {GAP_WORDING} from "@/const/kfpa.const"; +import {DIV_KEYS, REGION_KEY_MAP} from "@/config/kfpaConfig"; export const signStyleGapRow: SignStyle = { rowSelector: (row) => row.label === GAP_WORDING, @@ -18,15 +19,10 @@ export const signStyleGapRow: SignStyle = { paint: "text", }; -const DIV_COLUMNS = [ - { key: "-1", label: "전체" }, - { key: "1", label: "서울" }, - { key: "2", label: "경기" }, - { key: "3", label: "부산" }, - { key: "4", label: "대구" }, - { key: "5", label: "대전" }, - { key: "6", label: "광주" }, -] as const; +const DIV_COLUMNS = DIV_KEYS.map((key) => ({ + key, + label: key === "-1" ? "전체" : REGION_KEY_MAP[key], +})); const METRICS: Array<{ key: keyof Omit;