From ab6e2dcb726a95653bee2615a5b120c965ba9e39 Mon Sep 17 00:00:00 2001 From: veselovnk Date: Tue, 14 May 2024 13:05:47 +0300 Subject: [PATCH] MSP-3289 update user messages --- src/components/ApplicationsContent/index.tsx | 6 +++--- src/components/TokenContent/index.tsx | 4 ++-- src/pages/SessionsPage/index.tsx | 2 +- src/pages/UserEditor/index.tsx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/ApplicationsContent/index.tsx b/src/components/ApplicationsContent/index.tsx index fb363cc..37fb126 100644 --- a/src/components/ApplicationsContent/index.tsx +++ b/src/components/ApplicationsContent/index.tsx @@ -104,7 +104,7 @@ const ApplicationsContent: FC = ({ ...showApplicationsModal, updateModal: false }) - message.info('Элемент сохранен') + message.success('Элемент сохранен') }) .catch(() => message.error('Ошибка обновления элемента')) } @@ -120,7 +120,7 @@ const ApplicationsContent: FC = ({ createApplicationService(newApplicationApp) .unwrap() - .then(message.info('Элемент сохранен')) + .then(message.success('Элемент сохранен')) .catch((e) => message.error(e)) setShowApplicationsModal({ ...showApplicationsModal, @@ -131,7 +131,7 @@ const ApplicationsContent: FC = ({ removeApplicationsService([id]) .unwrap() .then(() => message.success('Элемент удален')) - .catch(() => message.info('Ошибка удаления элемента')) + .catch(() => message.error('Ошибка удаления элемента')) const renderColumnItems = (item: ColumnItem) => { return ( diff --git a/src/components/TokenContent/index.tsx b/src/components/TokenContent/index.tsx index dbb2f7f..06921aa 100644 --- a/src/components/TokenContent/index.tsx +++ b/src/components/TokenContent/index.tsx @@ -77,7 +77,7 @@ const TokenContent = ({ id }: TokenPropTypes) => { .then(() => { setShowApplicationsModal(false) reset() - message.info('Элемент добавлен') + message.success('Элемент добавлен') }) .catch(() => { message.error('Ошибка добавления элемента') @@ -106,7 +106,7 @@ const TokenContent = ({ id }: TokenPropTypes) => { revokeToken(currentRemoveToken) .unwrap() .then(() => message.success('Элемент удален')) - .catch(() => message.info('Ошибка удаления элемента')) + .catch(() => message.error('Ошибка удаления элемента')) } const columns: ColumnsType = [ diff --git a/src/pages/SessionsPage/index.tsx b/src/pages/SessionsPage/index.tsx index 1cb9e86..74d9661 100644 --- a/src/pages/SessionsPage/index.tsx +++ b/src/pages/SessionsPage/index.tsx @@ -71,7 +71,7 @@ const SessionsPage = () => { revokeSession(id) .unwrap() .then(() => message.success('Сессия успешно завершена')) - .catch(() => message.info('Не удалось завершить сессию')) + .catch(() => message.error('Не удалось завершить сессию')) } if (isLoading || !data) { diff --git a/src/pages/UserEditor/index.tsx b/src/pages/UserEditor/index.tsx index 407e848..c4cd7df 100644 --- a/src/pages/UserEditor/index.tsx +++ b/src/pages/UserEditor/index.tsx @@ -78,7 +78,7 @@ const UserEditor = () => { const exclusiveRole = findExclusiveRole(roles, value.roles as number[]) if (exclusiveRole) { if (value.roles && value.roles.length > 1) { - message.info( + message.error( <> Роль: {exclusiveRole.name} несовместима с другими ролями