diff --git a/src/pages/Documents/DocumentsTemplate.jsx b/src/pages/Documents/DocumentsTemplate.jsx index dbb4576..60d132d 100755 --- a/src/pages/Documents/DocumentsTemplate.jsx +++ b/src/pages/Documents/DocumentsTemplate.jsx @@ -40,7 +40,7 @@ export const DocumentsTemplate = ({ idCategory, well: givenWell, mimeTypes, head ), }, makeDateColumn('Дата загрузки', 'uploadDate'), - makeNumericColumn('Размер', 'size', null, null, formatBytes), + makeNumericColumn('Размер', 'size', null, null, (value) => formatBytes(value)), makeColumn('Автор', 'author', { render: item => }), makeColumn('Компания', 'company', { render: (_, record) => }), ...(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 update = useCallback(() => { - let begin = null - let end = null - if (filterDataRange?.length > 1) { - begin = filterDataRange[0].toISOString() - end = filterDataRange[1].toISOString() - } + const begin = filterDataRange?.length > 1 ? filterDataRange[0].toISOString() : null + const end = filterDataRange?.length > 1 ? filterDataRange[1].toISOString() : null invokeWebApiWrapperAsync( async () => {