asb_cloud_front/src/components/Views/PermissionView.tsx
goodm2ice e084727c72 Добавлена view для разрешений
К отображению телеметрии добавлено id
Актуализирован редактор ролей
Добавлена кнопка смены пароля
Окно смены пароля вынесено в компонент
2021-12-27 18:06:26 +05:00

28 lines
789 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Tooltip } from 'antd'
import { memo } from 'react'
import { PermissionDto } from '../../services/api'
import { Grid, GridItem } from '../Grid'
export type PermissionViewProps = {
info?: PermissionDto
}
export const PermissionView = memo<PermissionViewProps>(({ info }) => info ? (
<Tooltip overlayInnerStyle={{ width: '400px' }} title={
<Grid>
<GridItem row={1} col={1}>Название:</GridItem>
<GridItem row={1} col={2}>{info.name}</GridItem>
<GridItem row={2} col={1}>Описание:</GridItem>
<GridItem row={2} col={2}>{info.description}</GridItem>
</Grid>
}>
{info.name}
</Tooltip>
) : (
<Tooltip title={'нет данных'}>-</Tooltip>
))
export default PermissionView