From 1621e0c2ff0893d9252a779f8b4bc16bb08a1c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Wed, 13 Aug 2025 22:27:44 +0300 Subject: [PATCH] Navigation Problem giderildii --- ui/dev-dist/sw.js | 2 +- ui/src/utils/navigation.ts | 5 +++-- .../views/admin/organization-unit/OrganizationUnits.tsx | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index f962f04f..6f4eba4f 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.u7hl29mc92g" + "revision": "0.172lu27b4eg" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/ui/src/utils/navigation.ts b/ui/src/utils/navigation.ts index 4a5ce8dd..cd472c49 100644 --- a/ui/src/utils/navigation.ts +++ b/ui/src/utils/navigation.ts @@ -4,13 +4,13 @@ import { NAV_ITEM_TYPE_ITEM, NAV_ITEM_TYPE_TITLE, } from '@/constants/navigation.constant' -import { MenuDto } from '@/proxy/menus' +import { MenuDto } from '@/proxy/menus/models' export default function getChildren(menu: MenuDto[], parentCode: string | null): NavigationTree[] { const menus: NavigationTree[] = [] for (const child of menu.filter((a) => a.parentCode === parentCode)) { const item: NavigationTree = { - key: child.url ?? child.code ?? '', + key: child.url?.length ? child.url : child.code ?? '', path: child.url ?? '', title: child.displayName ?? '', icon: child.icon ?? '', @@ -19,6 +19,7 @@ export default function getChildren(menu: MenuDto[], parentCode: string | null): authority: [child.requiredPermissionName ?? ''], subMenu: [], } + if (child.code) { const subMenu = getChildren(menu, child.code) if (subMenu.length) { diff --git a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx index 918ae65c..d85a1bb1 100644 --- a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx +++ b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx @@ -56,11 +56,12 @@ import { FaFolder, FaMinusCircle, FaPlusCircle, FaTrash } from 'react-icons/fa' import { HiBadgeCheck, HiUser } from 'react-icons/hi' import { MdAccountTree, + MdAddModerator, + MdAdUnits, MdDelete, MdEdit, MdGroup, MdPersonAdd, - MdRadioButtonUnchecked, MdSupervisedUserCircle, } from 'react-icons/md' import { object, string } from 'yup' @@ -459,7 +460,7 @@ const OrganizationUnits = () => {
@@ -475,7 +476,7 @@ const OrganizationUnits = () => { }) }} > - {activeOu ? : } + {activeOu ? : }