From 6eb6f0f4c2964b4cc3f56fd7079337172aefe375 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Thu, 24 Feb 2022 15:39:30 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B3=D0=BB=D0=B0=D1=81=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F/=D0=BE=D1=82=D0=BA=D0=BB=D0=BE=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D1=81=D1=83=D1=82?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B8=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/DrillingProgram/CategoryRender.jsx | 159 +++++++++---------- 1 file changed, 79 insertions(+), 80 deletions(-) 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)} /> +
-
+ ) })