From ab0fa2cfc389f10144158087c77ac3a09a6f817b Mon Sep 17 00:00:00 2001 From: Nikolay <46225163+vigdorov@users.noreply.github.com> Date: Sun, 30 Aug 2020 10:58:19 +0300 Subject: [PATCH] =?UTF-8?q?HM-125.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D1=81=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8F=D0=BC=D0=B8=20(#59)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/UsersServiceAPI.js | 6 +- src/app.css | 2 +- src/app.html | 15 ++ .../avatar-modal-component/AvatarModal.js | 2 +- .../ClientLogsViewForm.js | 55 ++-- .../client-logs-view-form/consts.js | 29 +++ src/components/form-control/FormControl.js | 53 +++- src/components/profile-page/ProfilePage.js | 2 +- src/components/user-view-form/UserViewForm.js | 236 ++++++++++++++++++ src/components/user-view-form/index.js | 3 + src/components/users-page/UsersPage.js | 53 ++++ src/consts.js | 23 +- src/services/UserInfoService.js | 16 +- 13 files changed, 453 insertions(+), 42 deletions(-) create mode 100644 src/components/client-logs-view-form/consts.js create mode 100644 src/components/user-view-form/UserViewForm.js create mode 100644 src/components/user-view-form/index.js diff --git a/src/api/UsersServiceAPI.js b/src/api/UsersServiceAPI.js index 2154513..4edf1eb 100644 --- a/src/api/UsersServiceAPI.js +++ b/src/api/UsersServiceAPI.js @@ -31,7 +31,7 @@ class UsersService { return data; } - getMe = async () => { + getSelfInfo = async () => { const {data} = await http.get(`${ROOT_URL}/me`); return data; } @@ -69,8 +69,8 @@ class UsersService { * @param {string} login - Логин пользователя * @param {UpdateUserOptions} updateOptions - настройки для обновления пользователя */ - update = async (login, updateOptions) => { - const {data} = await http.put(ROOT_URL, {...updateOptions, login}); + update = async (user) => { + const {data} = await http.put(ROOT_URL, user); return data; } diff --git a/src/app.css b/src/app.css index 941f7fe..b0df30c 100644 --- a/src/app.css +++ b/src/app.css @@ -8,7 +8,7 @@ html, body { height: 100%; } -.Page > div:not(.Login__page) { +.Page > div:first-child:not(.Login__page) { padding-top: 74px; } diff --git a/src/app.html b/src/app.html index 7925079..5b31354 100644 --- a/src/app.html +++ b/src/app.html @@ -390,6 +390,21 @@ + + +