From 1ad82929fae99ecb4ba7d94a2a2433ad3500d8d6 Mon Sep 17 00:00:00 2001 From: mikheykinnv Date: Wed, 24 Apr 2024 11:49:37 +0800 Subject: [PATCH] MSP-3106 add applications page in menu --- src/components/Layout/index.tsx | 12 +++++++++++- src/components/Layout/layout.type.ts | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index cb4d411..78b0218 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -1,7 +1,8 @@ import { LockOutlined, LogoutOutlined, - ProfileOutlined + ProfileOutlined, + AppstoreAddOutlined } from '@ant-design/icons' import { ConfigProvider, Layout, Menu, Spin } from 'antd' import { useContext, useEffect, useState } from 'react' @@ -81,6 +82,12 @@ const LayoutComponent = () => { } ] }, + { + label: 'Группа приложений', + key: 'applications', + className: hideItem([PermissionKeysType.read]), + icon: + }, { label: 'Доступы приложений', key: 'appAccess', @@ -169,6 +176,9 @@ const LayoutComponent = () => { case MenuItemKeysType.roles: navigate(routePaths.roles) break + case MenuItemKeysType.applications: + navigate(routePaths.applications) + break default: } } diff --git a/src/components/Layout/layout.type.ts b/src/components/Layout/layout.type.ts index 4e7f612..93a4422 100644 --- a/src/components/Layout/layout.type.ts +++ b/src/components/Layout/layout.type.ts @@ -7,7 +7,8 @@ export enum MenuItemKeysType { appAccess = 'appAccess', roles = 'roles', logout = 'logout', - profile = 'profile' + profile = 'profile', + applications = 'applications', } interface MenuItem { @@ -42,6 +43,10 @@ export const menuKeys: Record = { [MenuItemKeysType.profile]: { key: MenuItemKeysType.profile, parent: [''] + }, + [MenuItemKeysType.applications]: { + key: MenuItemKeysType.applications, + parent: [''] } }