Navigation Problem giderildii
This commit is contained in:
parent
bac78eec46
commit
1621e0c2ff
3 changed files with 9 additions and 7 deletions
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "index.html",
|
"url": "index.html",
|
||||||
"revision": "0.u7hl29mc92g"
|
"revision": "0.172lu27b4eg"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ import {
|
||||||
NAV_ITEM_TYPE_ITEM,
|
NAV_ITEM_TYPE_ITEM,
|
||||||
NAV_ITEM_TYPE_TITLE,
|
NAV_ITEM_TYPE_TITLE,
|
||||||
} from '@/constants/navigation.constant'
|
} 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[] {
|
export default function getChildren(menu: MenuDto[], parentCode: string | null): NavigationTree[] {
|
||||||
const menus: NavigationTree[] = []
|
const menus: NavigationTree[] = []
|
||||||
for (const child of menu.filter((a) => a.parentCode === parentCode)) {
|
for (const child of menu.filter((a) => a.parentCode === parentCode)) {
|
||||||
const item: NavigationTree = {
|
const item: NavigationTree = {
|
||||||
key: child.url ?? child.code ?? '',
|
key: child.url?.length ? child.url : child.code ?? '',
|
||||||
path: child.url ?? '',
|
path: child.url ?? '',
|
||||||
title: child.displayName ?? '',
|
title: child.displayName ?? '',
|
||||||
icon: child.icon ?? '',
|
icon: child.icon ?? '',
|
||||||
|
|
@ -19,6 +19,7 @@ export default function getChildren(menu: MenuDto[], parentCode: string | null):
|
||||||
authority: [child.requiredPermissionName ?? ''],
|
authority: [child.requiredPermissionName ?? ''],
|
||||||
subMenu: [],
|
subMenu: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child.code) {
|
if (child.code) {
|
||||||
const subMenu = getChildren(menu, child.code)
|
const subMenu = getChildren(menu, child.code)
|
||||||
if (subMenu.length) {
|
if (subMenu.length) {
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,12 @@ import { FaFolder, FaMinusCircle, FaPlusCircle, FaTrash } from 'react-icons/fa'
|
||||||
import { HiBadgeCheck, HiUser } from 'react-icons/hi'
|
import { HiBadgeCheck, HiUser } from 'react-icons/hi'
|
||||||
import {
|
import {
|
||||||
MdAccountTree,
|
MdAccountTree,
|
||||||
|
MdAddModerator,
|
||||||
|
MdAdUnits,
|
||||||
MdDelete,
|
MdDelete,
|
||||||
MdEdit,
|
MdEdit,
|
||||||
MdGroup,
|
MdGroup,
|
||||||
MdPersonAdd,
|
MdPersonAdd,
|
||||||
MdRadioButtonUnchecked,
|
|
||||||
MdSupervisedUserCircle,
|
MdSupervisedUserCircle,
|
||||||
} from 'react-icons/md'
|
} from 'react-icons/md'
|
||||||
import { object, string } from 'yup'
|
import { object, string } from 'yup'
|
||||||
|
|
@ -459,7 +460,7 @@ const OrganizationUnits = () => {
|
||||||
<Container>
|
<Container>
|
||||||
<div className="flex flex-col lg:flex-row gap-4">
|
<div className="flex flex-col lg:flex-row gap-4">
|
||||||
<Card
|
<Card
|
||||||
className="md:w-2/12 min-w-fit"
|
className="md:w-3/12 min-w-fit"
|
||||||
header={translate('::Abp.Identity.OrganizationUnits')}
|
header={translate('::Abp.Identity.OrganizationUnits')}
|
||||||
headerExtra={
|
headerExtra={
|
||||||
<div className="flex gap-1">
|
<div className="flex gap-1">
|
||||||
|
|
@ -475,7 +476,7 @@ const OrganizationUnits = () => {
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{activeOu ? <MdAccountTree /> : <MdRadioButtonUnchecked />}
|
{activeOu ? <MdAccountTree /> : <MdAdUnits />}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -524,7 +525,7 @@ const OrganizationUnits = () => {
|
||||||
{Node}
|
{Node}
|
||||||
</Tree>
|
</Tree>
|
||||||
</Card>
|
</Card>
|
||||||
<Card className="md:w-10/12 w-full">
|
<Card className="md:w-9/12 w-full">
|
||||||
<Tabs defaultValue="users">
|
<Tabs defaultValue="users">
|
||||||
<TabList>
|
<TabList>
|
||||||
<TabNav value="users" icon={<HiUser />}>
|
<TabNav value="users" icon={<HiUser />}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue