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.
This commit is contained in:
@@ -1120,8 +1120,8 @@ export async function saveMenu(
|
||||
`INSERT INTO menu_info (
|
||||
objid, menu_type, parent_obj_id, menu_name_kor, menu_name_eng,
|
||||
seq, menu_url, menu_desc, writer, regdate, status,
|
||||
system_name, company_code, lang_key, lang_key_desc, screen_code
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
|
||||
system_name, company_code, lang_key, lang_key_desc, screen_code, menu_icon
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)
|
||||
RETURNING *`,
|
||||
[
|
||||
objid,
|
||||
@@ -1140,6 +1140,7 @@ export async function saveMenu(
|
||||
menuData.langKey || null,
|
||||
menuData.langKeyDesc || null,
|
||||
screenCode,
|
||||
menuData.menuIcon || null,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1323,8 +1324,9 @@ export async function updateMenu(
|
||||
company_code = $10,
|
||||
lang_key = $11,
|
||||
lang_key_desc = $12,
|
||||
screen_code = $13
|
||||
WHERE objid = $14
|
||||
screen_code = $13,
|
||||
menu_icon = $14
|
||||
WHERE objid = $15
|
||||
RETURNING *`,
|
||||
[
|
||||
menuData.menuType ? Number(menuData.menuType) : null,
|
||||
@@ -1340,6 +1342,7 @@ export async function updateMenu(
|
||||
menuData.langKey || null,
|
||||
menuData.langKeyDesc || null,
|
||||
screenCode,
|
||||
menuData.menuIcon || null,
|
||||
Number(menuId),
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user