diff --git a/src/pages/Documents/DocumentsTemplate.jsx b/src/pages/Documents/DocumentsTemplate.jsx index 1926379..674c066 100644 --- a/src/pages/Documents/DocumentsTemplate.jsx +++ b/src/pages/Documents/DocumentsTemplate.jsx @@ -1,4 +1,3 @@ -import moment from 'moment' import { useState, useEffect } from 'react' import { DatePicker, Button, Input } from 'antd' @@ -9,6 +8,7 @@ import { UploadForm } from '@components/UploadForm' import { CompanyView, UserView } from '@components/views' import { EditableTable, makePaginationObject } from '@components/Table' import { invokeWebApiWrapperAsync, downloadFile, formatBytes } from '@components/factory' +import { formatDate } from '@utils' const pageSize = 12 const { RangePicker } = DatePicker @@ -28,7 +28,7 @@ const columns = [ title: 'Дата загрузки', key: 'uploadDate', dataIndex: 'uploadDate', - render: item => moment.utc(item).local().format('DD MMM YYYY, HH:mm:ss'), + render: item => formatDate(item, false, 'DD MMM YYYY, HH:mm:ss'), }, { title: 'Размер', key: 'size', diff --git a/src/pages/DrillingProgram.jsx b/src/pages/DrillingProgram.jsx index 823bebc..3fccff3 100644 --- a/src/pages/DrillingProgram.jsx +++ b/src/pages/DrillingProgram.jsx @@ -140,14 +140,15 @@ export const DrillingProgram = ({ idWell }) => { ) - const lastUpdatedFileView = lastUpdatedFile && - - Последнее изменние: -  '{lastUpdatedFile.name}' -  [{formatBytes(lastUpdatedFile.size)}] -  загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()} -  автор: - + const lastUpdatedFileView = lastUpdatedFile && ( + + Последнее изменние: +  '{lastUpdatedFile.name}' +  [{formatBytes(lastUpdatedFile.size)}] +  загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()} +  автор: + + ) return (