@@ -106,7 +106,7 @@ export function PersonPage(props: { queryRef: PreloadedQuery<PersonPageQuery> })
|
||||
<div className="text-lg text-txt-secondary">{person.emailAddress}</div>
|
||||
</div>
|
||||
</div>
|
||||
{person.canDelete && (
|
||||
{person.canDelete && person.source !== "SCIM" && (
|
||||
<ActionDropdown variant="secondary">
|
||||
<DropdownItem
|
||||
variant="danger"
|
||||
|
||||
@@ -83,7 +83,7 @@ export function PeopleList(props: {
|
||||
<Thead>
|
||||
<Tr>
|
||||
<SortableTh field="FULL_NAME" onOrderChange={handleOrderChange}>{__("Name")}</SortableTh>
|
||||
<SortableTh field="STATUS">{__("Status")}</SortableTh>
|
||||
<SortableTh field="STATE">{__("Status")}</SortableTh>
|
||||
<SortableTh field="EMAIL_ADDRESS" onOrderChange={handleOrderChange}>{__("Email")}</SortableTh>
|
||||
<SortableTh field="ROLE" onOrderChange={handleOrderChange}>{__("Role")}</SortableTh>
|
||||
<SortableTh field="CREATED_AT" onOrderChange={handleOrderChange}>{__("Created on")}</SortableTh>
|
||||
|
||||
@@ -112,6 +112,9 @@ export function PeopleListItem(props: {
|
||||
|
||||
const isInactive = profile.state === "INACTIVE";
|
||||
|
||||
const canSendActivationMail = isInactive && profile.source !== "SCIM" && profile.canInvite;
|
||||
const canDelete = profile.canDelete && profile.source !== "SCIM";
|
||||
|
||||
const [inviteUser]
|
||||
= useMutationWithToasts<PeopleListItem_inviteMutation>(inviteUserMutation, {
|
||||
successMessage: __("Invitation sent successfully"),
|
||||
@@ -248,25 +251,27 @@ export function PeopleListItem(props: {
|
||||
{new Date(profile.createdAt).toLocaleDateString()}
|
||||
</Td>
|
||||
<Td noLink width={160} className="text-end">
|
||||
<ActionDropdown>
|
||||
{isInactive && profile.source !== "SCIM" && profile.canInvite && (
|
||||
<DropdownItem
|
||||
onClick={handleInvite}
|
||||
icon={IconMail}
|
||||
>
|
||||
{lastInvitation ? __("Resend activation mail") : __("Send activation mail")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
{profile.canDelete && profile.source !== "SCIM" && (
|
||||
<DropdownItem
|
||||
onClick={handleRemove}
|
||||
variant="danger"
|
||||
icon={IconTrashCan}
|
||||
>
|
||||
{__("Remove person")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
</ActionDropdown>
|
||||
{(canSendActivationMail || canDelete) && (
|
||||
<ActionDropdown>
|
||||
{canSendActivationMail && (
|
||||
<DropdownItem
|
||||
onClick={handleInvite}
|
||||
icon={IconMail}
|
||||
>
|
||||
{lastInvitation ? __("Resend activation mail") : __("Send activation mail")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
{canDelete && (
|
||||
<DropdownItem
|
||||
onClick={handleRemove}
|
||||
variant="danger"
|
||||
icon={IconTrashCan}
|
||||
>
|
||||
{__("Remove person")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
</ActionDropdown>
|
||||
)}
|
||||
</Td>
|
||||
</Tr>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user