diff --git a/src/components/views/TelemetryView.tsx b/src/components/views/TelemetryView.tsx index 702ebd2..8758353 100755 --- a/src/components/views/TelemetryView.tsx +++ b/src/components/views/TelemetryView.tsx @@ -1,8 +1,9 @@ import { Fragment, memo } from 'react' import { Tooltip } from 'antd' -import { TelemetryDto, TelemetryInfoDto } from '@api' import { Grid, GridItem } from '@components/Grid' +import { formatDate } from '@utils' +import { TelemetryDto, TelemetryInfoDto } from '@api' export const lables: Record = { timeZoneId: 'Временная зона', @@ -30,12 +31,17 @@ export const TelemetryView = memo(({ telemetry }) => telemet overlayInnerStyle={{ width: '400px' }} title={ - {(Object.keys(telemetry.info) as Array).map((key, i) => ( - - {lables[key] ?? key}: - {telemetry.info?.[key]} - - ))} + {(Object.keys(telemetry.info) as Array).map((key, i) => { + let value = telemetry.info?.[key] + value = key === 'drillingStartDate' ? formatDate(value) : value + + return ( + + {lables[key] ?? key}: + {value} + + ) + })} } > diff --git a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx index 41f129d..111d930 100755 --- a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx +++ b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx @@ -6,7 +6,7 @@ import { Button, Input } from 'antd' import { defaultPagination, makeColumn, - makeDateSorter, + makeDateColumn, makeNumericColumn, makeNumericRender, makeTextColumn, @@ -53,7 +53,7 @@ const TelemetryController = memo(() => { makeNumericColumn('ID', 'id', null, null, makeNumericRender(0)), makeTextColumn('UID', 'remoteUid'), makeTextColumn('Назначена на скважину', 'realWell'), - makeTextColumn('Дата начала бурения', 'drillingStartDate', null, makeDateSorter('drillingStartDate')), + makeDateColumn('Дата начала бурения', 'drillingStartDate'), makeTextColumn('Часовой пояс', 'timeZoneId'), makeTextColumn('Скважина', 'well'), makeTextColumn('Куст', 'cluster'),