-
+
*/}
-
+ {/*
canDeleteSites && this.remove(_site) }
>
-
+ */}
isAdmin && this.edit(_site) }
data-clickable
>
-
this.showTrackingCode(_site) }>{ 'Tracking Code' }
{/*
this.showGDPRForm(_site) } > */}
diff --git a/frontend/app/components/Client/Users/components/UserForm/UserForm.tsx b/frontend/app/components/Client/Users/components/UserForm/UserForm.tsx
index 19f44235c..c34828ec6 100644
--- a/frontend/app/components/Client/Users/components/UserForm/UserForm.tsx
+++ b/frontend/app/components/Client/Users/components/UserForm/UserForm.tsx
@@ -1,11 +1,11 @@
import React from 'react';
-import { Input, CopyButton, Button } from 'UI'
+import { Input, CopyButton, Button, Icon } from 'UI'
import cn from 'classnames';
import { useStore } from 'App/mstore';
import { useObserver } from 'mobx-react-lite';
import { useModal } from 'App/components/Modal';
import Select from 'Shared/Select';
-
+import { confirm } from 'UI/Confirmation';
interface Props {
isSmtp?: boolean;
isEnterprise?: boolean;
@@ -31,6 +31,18 @@ function UserForm(props: Props) {
const write = ({ target: { name, value } }) => {
user.updateKey(name, value);
}
+
+ const deleteHandler = async () => {
+ if (await confirm({
+ header: 'Confirm',
+ confirmButton: 'Yes, delete',
+ confirmation: `Are you sure you want to permanently delete this user?`
+ })) {
+ userStore.deleteUser(user.userId).then(() => {
+ hideModal();
+ });
+ }
+ }
return useObserver(() => (
@@ -118,14 +130,23 @@ function UserForm(props: Props) {
{ 'Cancel' }
- { !user.isJoined && user.invitationLink &&
-
- }
+
+
+
+
+
+
+ { !user.isJoined && user.invitationLink &&
+