Улучшены типы

This commit is contained in:
goodmice 2022-10-25 18:51:39 +05:00
parent 44543fec31
commit 0948c2a602
No known key found for this signature in database
GPG Key ID: 63EA771203189CF1
3 changed files with 5 additions and 7 deletions

View File

@ -6,7 +6,7 @@ import { Menu, MenuProps } from 'antd'
import { hasPermission, Permission } from '@utils'
type PrivateWellMenuItem = {
export type PrivateWellMenuItem = {
title: string
route: string
permissions: Permission | Permission[]
@ -69,7 +69,7 @@ export const makeItem = (
visible,
})
export type PrivateWellMenuProps = MenuProps & {
export type PrivateWellMenuProps = Omit<MenuProps, 'items'> & {
idWell?: number
items: PrivateWellMenuItem[]
rootPath?: string

View File

@ -13,9 +13,9 @@ import {
} from '@ant-design/icons'
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
import { isDev } from '@asb/utils'
import { isDev } from '@utils'
const menuItems = [
export const menuItems = [
makeItem('Месторождения', 'deposit', [], <FolderOutlined />),
makeItem('Кусты', 'cluster', [], <FolderOutlined />),
makeItem('Скважины', 'well', [], <FolderOutlined />),

View File

@ -16,9 +16,7 @@ import {
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
const menuItems = [
export const menuItems = [
makeItem('Телеметрия', 'telemetry', [], <FundViewOutlined />, [
makeItem('Мониторинг', 'telemetry', [], <FundViewOutlined />),
makeItem('Сообщения', 'messages', [], <AlertOutlined />),