Fleet UI: Transition fixed to edit user modal (#11128)

This commit is contained in:
RachelElysia 2023-04-11 11:45:26 -04:00 committed by GitHub
parent 5176e86e26
commit 8ae9738dc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 23 deletions

View File

@ -0,0 +1 @@
- Fleet UI: Fix animation for opening edit user modal

View File

@ -432,29 +432,25 @@ const UsersTable = ({ router }: IUsersTableProps): JSX.Element => {
const userData = getUser(userEditing.type, userEditing.id); const userData = getUser(userEditing.type, userEditing.id);
return ( return (
<Modal title="Edit user" onExit={toggleEditUserModal}> <EditUserModal
<> defaultEmail={userData?.email}
<EditUserModal defaultName={userData?.name}
defaultEmail={userData?.email} defaultGlobalRole={userData?.global_role}
defaultName={userData?.name} defaultTeams={userData?.teams}
defaultGlobalRole={userData?.global_role} onCancel={toggleEditUserModal}
defaultTeams={userData?.teams} onSubmit={onEditUser}
onCancel={toggleEditUserModal} availableTeams={teams || []}
onSubmit={onEditUser} isPremiumTier={isPremiumTier || false}
availableTeams={teams || []} smtpConfigured={config?.smtp_settings.configured || false}
isPremiumTier={isPremiumTier || false} sesConfigured={config?.email?.backend === "ses" || false}
smtpConfigured={config?.smtp_settings.configured || false} canUseSso={config?.sso_settings.enable_sso || false}
sesConfigured={config?.email?.backend === "ses" || false} isSsoEnabled={userData?.sso_enabled}
canUseSso={config?.sso_settings.enable_sso || false} isApiOnly={userData?.api_only || false}
isSsoEnabled={userData?.sso_enabled} isModifiedByGlobalAdmin
isApiOnly={userData?.api_only || false} isInvitePending={userEditing.type === "invite"}
isModifiedByGlobalAdmin editUserErrors={editUserErrors}
isInvitePending={userEditing.type === "invite"} isUpdatingUsers={isUpdatingUsers}
editUserErrors={editUserErrors} />
isUpdatingUsers={isUpdatingUsers}
/>
</>
</Modal>
); );
}; };