Client: EditGroupMembersDialog: Add showing type to each group member

This commit is contained in:
Aleksandr Lushkin 2024-08-23 18:18:39 +02:00
parent cec3ebad3b
commit 1eb751ab7b

View File

@ -43,7 +43,7 @@ import { toastr } from "@docspace/shared/components/toast";
import { HelpButton } from "@docspace/shared/components/help-button";
import { getUserRoleOptions } from "@docspace/shared/utils/room-members/getUserRoleOptions";
import { ShareAccessRights } from "@docspace/shared/enums";
import { getUserRole } from "@docspace/shared/utils/common";
import { getUserRole, getUserTypeLabel } from "@docspace/shared/utils/common";
import { TGroupMemberInvitedInRoom } from "@docspace/shared/api/groups/types";
import * as Styled from "./index.styled";
@ -87,6 +87,11 @@ const GroupMember = ({ member, infoPanelSelection }: GroupMemberProps) => {
const role = getUserRole(user, userRole?.type);
const typeLabel = getUserTypeLabel(
role as "owner" | "admin" | "user" | "collaborator" | "manager",
t,
);
let selectedUserRoleCBOption;
if (user.isOwner)
selectedUserRoleCBOption = {
@ -144,7 +149,8 @@ const GroupMember = ({ member, infoPanelSelection }: GroupMemberProps) => {
{decode(user.displayName)}
</Text>
<Text className="email" noSelect>
{user.email}
<span dir="auto">{typeLabel}</span> |{" "}
<span dir="ltr">{user.email}</span>
</Text>
</div>
</div>