diff --git a/src/pages/DrillingProgram/CategoryRender.jsx b/src/pages/DrillingProgram/CategoryRender.jsx index 2f31cb5..92e5ea9 100644 --- a/src/pages/DrillingProgram/CategoryRender.jsx +++ b/src/pages/DrillingProgram/CategoryRender.jsx @@ -1,22 +1,23 @@ import { memo, useCallback, useState } from 'react' import { Button, Input, Popconfirm, Form } from 'antd' import { - ClearOutlined, - SettingOutlined, + DeleteOutlined, + EditOutlined, TableOutlined, } from '@ant-design/icons' -import { formatDate } from '@utils' -import { DrillingProgramService } from '@api' -import { formatBytes, invokeWebApiWrapperAsync, notify } from '@components/factory' -import { UploadForm } from '@components/UploadForm' -import DownloadLink from '@components/DownloadLink' +import Poprompt from '@components/Poprompt' import { UserView } from '@components/views' +import UploadForm from '@components/UploadForm' +import DownloadLink from '@components/DownloadLink' +import { formatBytes, invokeWebApiWrapperAsync, notify } from '@components/factory' +import { DrillingProgramService } from '@api' +import { formatDate } from '@utils' import MarksCard from './MarksCard' import '@styles/drilling_program.less' -import Poprompt from '@asb/components/Poprompt' +import LoaderPortal from '@asb/components/LoaderPortal' const CommentPrompt = memo((props) => ( -
-

{title}

-
- - Вы уверены, что хотите удалить категорию
"{title}"?} - > - -
+ +
+
+

{title}

+ {permissionToEdit && ( +
+ + Вы уверены, что хотите удалить категорию
"{title}"?} + > + +
+
+ )}
-
-
-
-
- {file ? ( - <> - -
Автор:
-
Размер: {file.size ? formatBytes(file.size) : '-'}
-
Загружен: {formatDate(file.uploadDate) ?? '-'}
- - ) : ( -
Нет загруженных файлов
- )} -
-
- setIsUploading(true)} - onUploadComplete={() => onUpdate?.(idFileCategory)} - onUploadError={(e) => notify(e?.message ?? 'Ошибка загрузки файла', 'error')} - /> - -
-
-
-
- {approvers.map((user, i) => ( - - - - ))} -
-
- {permissionToApprove && ( - +
+
+ {file ? ( + <> + +
Автор:
+
Размер: {file.size ? formatBytes(file.size) : '-'}
+
Загружен: {formatDate(file.uploadDate) ?? '-'}
+ + ) : ( +
Нет загруженных файлов
+ )} +
+
+ setIsUploading(true)} + onUploadComplete={() => onUpdate?.(idFileCategory)} + onUploadError={(e) => notify(e?.message ?? 'Ошибка загрузки файла', 'error')} /> - )} - mark.idMarkType === 1)} /> + +
-
- {permissionToApprove && ( - - )} - mark.idMarkType === 0)} /> +
+
+ {approvers.map((user, i) => ( + + + + ))} +
+
+ {permissionToApprove && file && ( + + )} + mark.idMarkType === 1)} /> +
+
+ {permissionToApprove && file && ( + + )} + mark.idMarkType === 0)} /> +
-
+ ) })