Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Update messages in the dialogs for groups (#1208)
Browse files Browse the repository at this point in the history
* Update messages

* Refinement
  • Loading branch information
sjaanus committed Aug 8, 2022
1 parent 5c27228 commit 499740e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,22 @@ export const RemoveGroupUser: FC<IRemoveGroupUserProps> = ({
}
};

const userName = user?.name || user?.username || user?.email;
return (
<Dialogue
open={open && Boolean(user)}
primaryButtonText="Remove"
primaryButtonText="Remove user"
secondaryButtonText="Cancel"
onClick={onRemoveClick}
onClose={() => {
setOpen(false);
}}
title="Remove user from group"
title="Remove user from group?"
>
<Typography>
Are you sure you wish to remove{' '}
<strong>{user?.name || user?.username || user?.email}</strong>{' '}
from <strong>{group.name}</strong>? Removing the user from this
group may also remove their access from projects this group is
assigned to.
Do you really want to remove <strong>{userName}</strong> from{' '}
<strong>{group.name}</strong>? <strong>{userName}</strong> will
lose all access rights granted by this group.
</Typography>
</Dialogue>
);
Expand Down
10 changes: 5 additions & 5 deletions src/component/admin/groups/RemoveGroup/RemoveGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ export const RemoveGroup: FC<IRemoveGroupProps> = ({
return (
<Dialogue
open={open}
primaryButtonText="Remove"
primaryButtonText="Delete group"
secondaryButtonText="Cancel"
onClick={onRemoveClick}
onClose={() => {
setOpen(false);
}}
title="Delete group"
title="Delete group?"
>
<Typography>
Are you sure you wish to delete <strong>{group.name}</strong>?
If this group is currently assigned to one or more projects then
users belonging to this group may lose access to those projects.
Do you really want to delete <strong>{group.name}</strong>?
Users who are granted access to projects only via this group
will lose access to those projects.
</Typography>
</Dialogue>
);
Expand Down

0 comments on commit 499740e

Please sign in to comment.