Requested changes

This commit is contained in:
Daniel Hougaard
2024-09-11 12:45:14 +04:00
parent 4dda270e8e
commit ea5e8e29e6
11 changed files with 74 additions and 162 deletions
-20
View File
@@ -40,24 +40,4 @@ export type TGroupWithProjectMemberships = {
name: string;
slug: string;
orgId: string;
projectMemberships: {
id: string;
project: {
id: string;
name: string;
slug: string;
};
roles: {
id: string;
role: string;
customRoleId: string | null;
customRoleName: string | null;
customRoleSlug: string | null;
temporaryRange: string | null;
temporaryMode: string | null;
temporaryAccessEndTime: string | null;
temporaryAccessStartTime: string | null;
isTemporary: boolean;
}[];
}[];
};
@@ -20,26 +20,24 @@ export const UserGroupsRow = ({ group, handlePopUpOpen }: Props) => {
>
<Td>{group.name}</Td>
<Td>
{true && (
<div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
<Tooltip content="Remove user from group">
<IconButton
colorSchema="danger"
ariaLabel="copy icon"
variant="plain"
className="group relative"
onClick={(e) => {
e.stopPropagation();
handlePopUpOpen("removeUserFromGroup", {
groupSlug: group.slug
});
}}
>
<FontAwesomeIcon icon={faTrash} />
</IconButton>
</Tooltip>
</div>
)}
<div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
<Tooltip content="Unassign user from group">
<IconButton
colorSchema="danger"
ariaLabel="copy icon"
variant="plain"
className="group relative"
onClick={(e) => {
e.stopPropagation();
handlePopUpOpen("removeUserFromGroup", {
groupSlug: group.slug
});
}}
>
<FontAwesomeIcon icon={faTrash} />
</IconButton>
</Tooltip>
</div>
</Td>
</Tr>
</>
@@ -52,7 +52,7 @@ export const UserGroupsSection = ({ orgMembership }: Props) => {
<DeleteActionModal
isOpen={popUp.removeUserFromGroup.isOpen}
title="Are you sure want to remove user from group?"
title="Are you sure want to unassign user from group?"
onChange={(isOpen) => handlePopUpToggle("removeUserFromGroup", isOpen)}
deleteKey="confirm"
onDeleteApproved={() => {