Исправлено отображение дат на документах и программе бурения

This commit is contained in:
Александр Сироткин 2022-02-10 15:57:59 +05:00
parent 90d95c9964
commit 82510f0798
2 changed files with 11 additions and 10 deletions

View File

@ -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',

View File

@ -140,14 +140,15 @@ export const DrillingProgram = ({ idWell }) => {
</div>
)
const lastUpdatedFileView = lastUpdatedFile &&
<Text>
<b>Последнее изменние:</b>
&nbsp;'{lastUpdatedFile.name}'
&nbsp;[{formatBytes(lastUpdatedFile.size)}]
&nbsp;загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()}
&nbsp;автор: <UserView user={lastUpdatedFile.author}/>
</Text>
const lastUpdatedFileView = lastUpdatedFile && (
<Text>
<b>Последнее изменние:</b>
&nbsp;'{lastUpdatedFile.name}'
&nbsp;[{formatBytes(lastUpdatedFile.size)}]
&nbsp;загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()}
&nbsp;автор: <UserView user={lastUpdatedFile.author}/>
</Text>
)
return (
<LoaderPortal show={showLoader}>