add better messaging for removing own user record
parent
91317a164d
commit
96de896539
|
@ -165,7 +165,6 @@ export const deleteUserAsync = (
|
|||
) => async dispatch => {
|
||||
dispatch(removeUser(user))
|
||||
try {
|
||||
console.log(user)
|
||||
await deleteUserAJAX(user)
|
||||
dispatch(
|
||||
publishAutoDismissingNotification(
|
||||
|
|
|
@ -38,6 +38,10 @@ const AllUsersTableRow = ({
|
|||
|
||||
const wrappedDelete = () => onDelete(user)
|
||||
|
||||
const removeWarning = userIsMe
|
||||
? 'WARNING: this will remove your user record entirely and log you out'
|
||||
: 'Remove from all Orgs'
|
||||
|
||||
return (
|
||||
<tr className={'chronograf-admin-table--user'}>
|
||||
<td>
|
||||
|
@ -75,11 +79,10 @@ const AllUsersTableRow = ({
|
|||
</td>
|
||||
<td style={{textAlign: 'right', width: colActions}}>
|
||||
<ConfirmButton
|
||||
confirmText="Remove from all Orgs"
|
||||
confirmText={removeWarning}
|
||||
confirmAction={wrappedDelete}
|
||||
size="btn-xs"
|
||||
text="Remove"
|
||||
disabled={userIsMe}
|
||||
customClass="table--show-on-row-hover"
|
||||
/>
|
||||
</td>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
top: calc(100% + 8px);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
.confirm-button--confirmation {
|
||||
|
|
Loading…
Reference in New Issue