From 82510f07988e1e799068ab8c41c3bf28462473d2 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Thu, 10 Feb 2022 15:57:59 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=B0=D1=82=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=85=20?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B5?= =?UTF-8?q?=20=D0=B1=D1=83=D1=80=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Documents/DocumentsTemplate.jsx | 4 ++-- src/pages/DrillingProgram.jsx | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) 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 (