forked from ddrilling/asb_cloud_front
Улучшены типы
This commit is contained in:
parent
44543fec31
commit
0948c2a602
@ -6,7 +6,7 @@ import { Menu, MenuProps } from 'antd'
|
|||||||
|
|
||||||
import { hasPermission, Permission } from '@utils'
|
import { hasPermission, Permission } from '@utils'
|
||||||
|
|
||||||
type PrivateWellMenuItem = {
|
export type PrivateWellMenuItem = {
|
||||||
title: string
|
title: string
|
||||||
route: string
|
route: string
|
||||||
permissions: Permission | Permission[]
|
permissions: Permission | Permission[]
|
||||||
@ -69,7 +69,7 @@ export const makeItem = (
|
|||||||
visible,
|
visible,
|
||||||
})
|
})
|
||||||
|
|
||||||
export type PrivateWellMenuProps = MenuProps & {
|
export type PrivateWellMenuProps = Omit<MenuProps, 'items'> & {
|
||||||
idWell?: number
|
idWell?: number
|
||||||
items: PrivateWellMenuItem[]
|
items: PrivateWellMenuItem[]
|
||||||
rootPath?: string
|
rootPath?: string
|
||||||
|
@ -13,9 +13,9 @@ import {
|
|||||||
} from '@ant-design/icons'
|
} from '@ant-design/icons'
|
||||||
|
|
||||||
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
|
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
|
||||||
import { isDev } from '@asb/utils'
|
import { isDev } from '@utils'
|
||||||
|
|
||||||
const menuItems = [
|
export const menuItems = [
|
||||||
makeItem('Месторождения', 'deposit', [], <FolderOutlined />),
|
makeItem('Месторождения', 'deposit', [], <FolderOutlined />),
|
||||||
makeItem('Кусты', 'cluster', [], <FolderOutlined />),
|
makeItem('Кусты', 'cluster', [], <FolderOutlined />),
|
||||||
makeItem('Скважины', 'well', [], <FolderOutlined />),
|
makeItem('Скважины', 'well', [], <FolderOutlined />),
|
||||||
|
@ -16,9 +16,7 @@ import {
|
|||||||
|
|
||||||
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
|
import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu'
|
||||||
|
|
||||||
|
export const menuItems = [
|
||||||
|
|
||||||
const menuItems = [
|
|
||||||
makeItem('Телеметрия', 'telemetry', [], <FundViewOutlined />, [
|
makeItem('Телеметрия', 'telemetry', [], <FundViewOutlined />, [
|
||||||
makeItem('Мониторинг', 'telemetry', [], <FundViewOutlined />),
|
makeItem('Мониторинг', 'telemetry', [], <FundViewOutlined />),
|
||||||
makeItem('Сообщения', 'messages', [], <AlertOutlined />),
|
makeItem('Сообщения', 'messages', [], <AlertOutlined />),
|
||||||
|
Loading…
Reference in New Issue
Block a user