260615_01_FST: First Commit
This commit is contained in:
13
src/config/gwcf.config.ts
Normal file
13
src/config/gwcf.config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const SITE_TITLE = "강원 문화예술 지원 사업 모니터링 및 종합평가";
|
||||
|
||||
export const TOP_MENU_KEY_MAP: Record<string, string> = {
|
||||
"performance-list":"사업정보",
|
||||
"user-list":"계정관리",
|
||||
}
|
||||
|
||||
export const TOP_MENU_PATH_MAP: Record<string, string> = {
|
||||
"performance-list":"/performance",
|
||||
"user-list":"/user",
|
||||
}
|
||||
|
||||
export const MONITORING_USER_ROLE = 9003;
|
||||
17
src/config/menu.data.ts
Normal file
17
src/config/menu.data.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import {TopMenuItem} from "@/config/menu.type";
|
||||
import {TOP_MENU_KEY_MAP, TOP_MENU_PATH_MAP} from "@/config/gwcf.config";
|
||||
|
||||
|
||||
|
||||
export const TOP_MENUS: TopMenuItem[] = Object.entries(TOP_MENU_KEY_MAP).map(
|
||||
([key, value]) => {
|
||||
const path = `/${TOP_MENU_PATH_MAP[key].replace(/^\/+/, "")}`;
|
||||
|
||||
return {
|
||||
id: key,
|
||||
label: value,
|
||||
path,
|
||||
match: (pathname: string) => pathname === path,
|
||||
};
|
||||
}
|
||||
);
|
||||
6
src/config/menu.type.ts
Normal file
6
src/config/menu.type.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export type TopMenuItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
path: string;
|
||||
match?: (pathname: string) => boolean;
|
||||
};
|
||||
Reference in New Issue
Block a user