From ffad45c8fd04bc2275f584b2a2d84e104b29436f Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Wed, 6 Nov 2024 22:38:07 +0100 Subject: [PATCH 1/4] CB-5891 on disable user changes form state according to its real state --- .../Users/UserForm/AdministrationUserForm.tsx | 10 +++++++++- .../AdministrationUserFormDeleteButton.tsx | 18 +++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx index 89251c7f6e..5441f50984 100644 --- a/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx +++ b/webapp/packages/plugin-authentication-administration/src/Administration/Users/UserForm/AdministrationUserForm.tsx @@ -59,6 +59,10 @@ export const AdministrationUserForm = observer(function AdministrationUse }, }); + function onDisableUser() { + userFormInfoPart.state.enabled = false; + } + useAutoLoad(AdministrationUserForm, [userFormInfoPart]); return ( @@ -77,7 +81,11 @@ export const AdministrationUserForm = observer(function AdministrationUse {editing && ( - + )}