260506_01_fst: First Commit

This commit is contained in:
2026-05-06 17:00:45 +09:00
parent dd5cac3d78
commit 934a71e47a
76 changed files with 9488 additions and 222 deletions

46
src/config/kfpaConfig.ts Normal file
View File

@@ -0,0 +1,46 @@
export const SITE_TITLE = "화재보험협회 대시보드"
export const CATEGORY_KEY_MAP: Record<string, string> = {
'2601009_A': '안전점검',
'2604005_E': 'UCIS',
'2604005_D': 'Bridge플랫폼',
'2604005_C': '방재컨설팅',
'2604005_A': '보험 공동인수',
'2604005_B': '화재조사',
};
export const CATEGORY_PATH_MAP: Record<string, string> = {
'2601009_A': 'safety-inspection',
'2604005_E': 'ucis',
'2604005_D': 'bridge-platform',
'2604005_C': 'consulting',
'2604005_A': 'insurance-operations',
'2604005_B': 'fire-investigation',
};
export const CATEGORY_KEYS = Object.keys(CATEGORY_KEY_MAP) as Array<keyof typeof CATEGORY_KEY_MAP>;
export const CATEGORIES = Object.values(CATEGORY_KEY_MAP) as Array<string>;
export const DIV_KEY_MAP: Record<string, string> = {
'-1': '전체',
'1': '서울인천지역본부',
'2': '경기강원지역본부',
'3': '부산경남지역본부',
'4': '대구경북지역본부',
'5': '대전충청지역본부',
'6': '광주호남지역본부',
};
export const DIV_KEYS = Object.keys(DIV_KEY_MAP) as Array<keyof typeof DIV_KEY_MAP>;
export const DIVS = Object.values(DIV_KEY_MAP) as Array<string>;
export const REGION_KEY_MAP: Record<string, string> = {
'1': '서울',
'2': '경기',
'3': '부산',
'4': '대구',
'5': '대전',
'6': '광주',
};

28
src/config/menu.data.ts Normal file
View File

@@ -0,0 +1,28 @@
import {SideMenuItem, TopMenuItem} from "@/config/menu.type";
import {CATEGORY_KEY_MAP, CATEGORY_PATH_MAP, DIV_KEY_MAP} from "./kfpaConfig";
import { Building } from 'lucide-react';
export const TOP_MENUS: TopMenuItem[] = Object.entries(CATEGORY_KEY_MAP).map(
([key, value]) => {
const path = `/${CATEGORY_PATH_MAP[key].replace(/^\/+/, "")}`;
return {
id: key,
label: value,
path,
match: (pathname: string) => pathname === path,
};
}
);
export const SIDE_MENUS :SideMenuItem[] = Object.entries(DIV_KEY_MAP)
.sort(([a], [b]) => {
if (a === "-1") return -1;
if (b === "-1") return 1;
return Number(a) - Number(b);
})
.map(([key, value]) => ({
id: key,
label: value,
icon: Building,
}));

14
src/config/menu.type.ts Normal file
View File

@@ -0,0 +1,14 @@
import {LucideIcon} from "lucide-react";
export type TopMenuItem = {
id: string;
label: string;
path: string;
match?: (pathname: string) => boolean;
};
export type SideMenuItem = {
id: string;
label: string;
icon: LucideIcon;
};