forked from ddrilling/asb_cloud_front
Исправлено отображение размера в таблицах документов
This commit is contained in:
parent
443f14c0a8
commit
799fff7c0e
@ -40,7 +40,7 @@ export const DocumentsTemplate = ({ idCategory, well: givenWell, mimeTypes, head
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
makeDateColumn('Дата загрузки', 'uploadDate'),
|
makeDateColumn('Дата загрузки', 'uploadDate'),
|
||||||
makeNumericColumn('Размер', 'size', null, null, formatBytes),
|
makeNumericColumn('Размер', 'size', null, null, (value) => formatBytes(value)),
|
||||||
makeColumn('Автор', 'author', { render: item => <UserView user={item}/> }),
|
makeColumn('Автор', 'author', { render: item => <UserView user={item}/> }),
|
||||||
makeColumn('Компания', 'company', { render: (_, record) => <CompanyView company={record?.author?.company}/> }),
|
makeColumn('Компания', 'company', { render: (_, record) => <CompanyView company={record?.author?.company}/> }),
|
||||||
...(customColumns ?? [])
|
...(customColumns ?? [])
|
||||||
@ -49,12 +49,8 @@ export const DocumentsTemplate = ({ idCategory, well: givenWell, mimeTypes, head
|
|||||||
const filenames = useMemo(() => files.map(file => file.name).filter(Boolean).filter(unique), [files])
|
const filenames = useMemo(() => files.map(file => file.name).filter(Boolean).filter(unique), [files])
|
||||||
|
|
||||||
const update = useCallback(() => {
|
const update = useCallback(() => {
|
||||||
let begin = null
|
const begin = filterDataRange?.length > 1 ? filterDataRange[0].toISOString() : null
|
||||||
let end = null
|
const end = filterDataRange?.length > 1 ? filterDataRange[1].toISOString() : null
|
||||||
if (filterDataRange?.length > 1) {
|
|
||||||
begin = filterDataRange[0].toISOString()
|
|
||||||
end = filterDataRange[1].toISOString()
|
|
||||||
}
|
|
||||||
|
|
||||||
invokeWebApiWrapperAsync(
|
invokeWebApiWrapperAsync(
|
||||||
async () => {
|
async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user