forked from ddrilling/asb_cloud_front
Улучшено позиционирование подсказки о скважине в сообщениях с ошибкой
This commit is contained in:
parent
6a97da855d
commit
d3fd851e20
@ -30,7 +30,7 @@ export const notify = (body?: ReactNode, notifyType: NotifyType = 'info', well?:
|
||||
const message = (
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<span>{instance.message}</span>
|
||||
<WellView well={well} />
|
||||
<WellView placement={'leftBottom'} well={well} />
|
||||
</div>
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { memo } from 'react'
|
||||
import { Tooltip } from 'antd'
|
||||
import { Tooltip, TooltipProps } from 'antd'
|
||||
|
||||
import { Grid, GridItem } from '@components/Grid'
|
||||
import { WellIcon, WellIconState } from '@components/icons'
|
||||
@ -13,12 +13,12 @@ const wellState: Record<number, { enum: WellIconState, label: string }> = {
|
||||
2: { enum: 'inactive', label: 'Завершена' },
|
||||
}
|
||||
|
||||
export type WellViewProps = {
|
||||
export type WellViewProps = TooltipProps & {
|
||||
well?: WellDto
|
||||
}
|
||||
|
||||
export const WellView = memo<WellViewProps>(({ well }) => well ? (
|
||||
<Tooltip title={(
|
||||
export const WellView = memo<WellViewProps>(({ well, ...other }) => well ? (
|
||||
<Tooltip {...other} title={(
|
||||
<Grid style={{ columnGap: '8px' }}>
|
||||
<GridItem row={1} col={1}>Название:</GridItem>
|
||||
<GridItem row={1} col={2}>{well.caption ?? '---'}</GridItem>
|
||||
|
Loading…
Reference in New Issue
Block a user