({
id: 0,
name: '',
login: '',
email: '',
+ password: '',
bindTenantId: '',
role: 'VIEWER',
meta: {},
@@ -53,10 +55,13 @@ export default function UserEdit({ userId }: UserEditProps) {
});
if (Object.keys(updatedUser).length > 0) {
+ console.log('updateUser', userId, updatedUser);
await UserService.updateUser(userId!, updatedUser);
}
setLoading(false);
+ message.info(t('editAccountMessage'), 4);
+ closeDrawer();
};
return (
diff --git a/client/src/config/i18n.ts b/client/src/config/i18n.ts
index 360cde1..c3ea6eb 100644
--- a/client/src/config/i18n.ts
+++ b/client/src/config/i18n.ts
@@ -49,6 +49,7 @@ i18n
createdAt: 'Created',
saving: 'Saving...',
createdAccountMessage: 'User successfully created!',
+ editAccountMessage: 'User successfully updated!',
you: '(You)',
},
},
@@ -91,6 +92,7 @@ i18n
createdAt: 'Создано',
saving: 'Сохранение...',
createdAccountMessage: 'Пользователь успешно создан!',
+ editAccountMessage: 'Пользователь успешно обновлен!',
you: '(Вы)',
},
},
diff --git a/client/src/pages/AccountsPage.tsx b/client/src/pages/AccountsPage.tsx
index 317cfee..7c65e2e 100644
--- a/client/src/pages/AccountsPage.tsx
+++ b/client/src/pages/AccountsPage.tsx
@@ -123,6 +123,15 @@ export default function AccountsPage() {
title: t('createdAt'),
dataIndex: 'createdAt',
key: 'createdAt',
+ render: (text) => (
+
+ {new Date(text).toLocaleString('ru', {
+ year: '2-digit',
+ month: '2-digit',
+ day: '2-digit',
+ })}
+
+ ),
},
{
title: t('status'),
@@ -191,7 +200,7 @@ export default function AccountsPage() {
closeDrawer={closeEditDrawer}
type="edit"
>
-
+
>
);
diff --git a/client/src/pages/LoginPage.tsx b/client/src/pages/LoginPage.tsx
index b6b65e9..c2c74c7 100644
--- a/client/src/pages/LoginPage.tsx
+++ b/client/src/pages/LoginPage.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Form, Input, Button, Typography } from 'antd';
+import { Form, Input, Button, Typography, message } from 'antd';
import {
EyeInvisibleOutlined,
EyeTwoTone,
@@ -45,7 +45,11 @@ export default function LoginPage() {
/>
-