forked from ddrilling/asb_cloud_front
Исправлено отображение дат на документах и программе бурения
This commit is contained in:
parent
90d95c9964
commit
82510f0798
@ -1,4 +1,3 @@
|
|||||||
import moment from 'moment'
|
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { DatePicker, Button, Input } from 'antd'
|
import { DatePicker, Button, Input } from 'antd'
|
||||||
|
|
||||||
@ -9,6 +8,7 @@ import { UploadForm } from '@components/UploadForm'
|
|||||||
import { CompanyView, UserView } from '@components/views'
|
import { CompanyView, UserView } from '@components/views'
|
||||||
import { EditableTable, makePaginationObject } from '@components/Table'
|
import { EditableTable, makePaginationObject } from '@components/Table'
|
||||||
import { invokeWebApiWrapperAsync, downloadFile, formatBytes } from '@components/factory'
|
import { invokeWebApiWrapperAsync, downloadFile, formatBytes } from '@components/factory'
|
||||||
|
import { formatDate } from '@utils'
|
||||||
|
|
||||||
const pageSize = 12
|
const pageSize = 12
|
||||||
const { RangePicker } = DatePicker
|
const { RangePicker } = DatePicker
|
||||||
@ -28,7 +28,7 @@ const columns = [
|
|||||||
title: 'Дата загрузки',
|
title: 'Дата загрузки',
|
||||||
key: 'uploadDate',
|
key: 'uploadDate',
|
||||||
dataIndex: '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: 'Размер',
|
title: 'Размер',
|
||||||
key: 'size',
|
key: 'size',
|
||||||
|
@ -140,14 +140,15 @@ export const DrillingProgram = ({ idWell }) => {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
const lastUpdatedFileView = lastUpdatedFile &&
|
const lastUpdatedFileView = lastUpdatedFile && (
|
||||||
<Text>
|
<Text>
|
||||||
<b>Последнее изменние:</b>
|
<b>Последнее изменние:</b>
|
||||||
'{lastUpdatedFile.name}'
|
'{lastUpdatedFile.name}'
|
||||||
[{formatBytes(lastUpdatedFile.size)}]
|
[{formatBytes(lastUpdatedFile.size)}]
|
||||||
загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()}
|
загружен: {new Date(lastUpdatedFile.uploadDate).toLocaleString()}
|
||||||
автор: <UserView user={lastUpdatedFile.author}/>
|
автор: <UserView user={lastUpdatedFile.author}/>
|
||||||
</Text>
|
</Text>
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LoaderPortal show={showLoader}>
|
<LoaderPortal show={showLoader}>
|
||||||
|
Loading…
Reference in New Issue
Block a user