Files
kjs ce8b4ed688 feat: Add menu icon support in menu management
- Enhanced the menu management functionality by adding a new `menu_icon` field in the database schema, allowing for the storage of menu icons.
- Updated the `saveMenu` and `updateMenu` functions in the admin controller to handle the new `menu_icon` field during menu creation and updates.
- Modified the `AdminService` to include `MENU_ICON` in various queries, ensuring that the icon data is retrieved and processed correctly.
- Integrated the `MenuIconPicker` component in the frontend to allow users to select and display menu icons in the `MenuFormModal`.
- Updated the sidebar and layout components to utilize the new icon data, enhancing the visual representation of menus across the application.
2026-03-03 15:42:30 +09:00

92 lines
1.8 KiB
TypeScript

/**
* 메뉴 관련 타입 정의
*/
export interface MenuItem {
objid: string;
parentObjId: string;
menuNameKor: string;
menuNameEng: string;
menuUrl: string;
menuDesc: string;
status: "ACTIVE" | "INACTIVE";
statusTitle: string;
seq: number;
lev: number;
menuType: "admin" | "user";
lpadMenuNameKor: string;
writer?: string;
regdate?: string;
company_code?: string;
company_name?: string;
// 계층적 메뉴 구조를 위한 필드들
children?: MenuItem[];
// 아이콘 필드
menu_icon?: string;
// 번역 관련 필드들
translated_name?: string;
translated_desc?: string;
lang_key?: string;
lang_key_desc?: string;
// 백엔드에서 오는 대문자 키들 (fallback)
OBJID?: string;
PARENT_OBJ_ID?: string;
MENU_NAME_KOR?: string;
MENU_NAME_ENG?: string;
MENU_URL?: string;
MENU_DESC?: string;
STATUS?: string;
STATUS_TITLE?: string;
SEQ?: number;
LEV?: number;
MENU_TYPE?: string;
LPAD_MENU_NAME_KOR?: string;
WRITER?: string;
REGDATE?: string;
COMPANY_CODE?: string;
COMPANY_NAME?: string;
// 아이콘 대문자 키
MENU_ICON?: string;
// 번역 관련 대문자 키들
TRANSLATED_NAME?: string;
TRANSLATED_DESC?: string;
LANG_KEY?: string;
LANG_KEY_DESC?: string;
}
export interface MenuState {
menuList: MenuItem[];
expandedMenus: Set<string>;
isLoading: boolean;
}
export interface MenuFormData {
menuNameKor: string;
menuNameEng: string;
menuUrl: string;
menuDesc: string;
status: "ACTIVE" | "INACTIVE";
seq: number;
parentObjId: string;
menuType: "admin" | "user";
}
export interface MenuApiResponse {
success: boolean;
data?: MenuItem[];
message?: string;
errorCode?: string;
}
export interface MenuFormResponse {
success: boolean;
message: string;
errorCode?: string;
}