Web: People: fixed the user position cell

This commit is contained in:
Nikita Gopienko 2022-01-10 15:56:38 +03:00
parent efffe7feb3
commit 901d48b4f0
2 changed files with 6 additions and 19 deletions

View File

@ -44,22 +44,7 @@ const PeopleTableRow = (props) => {
onUserNameClick, onUserNameClick,
isAdmin, isAdmin,
} = props; } = props;
const { displayName, email, role, statusType, userName } = item; const { displayName, email, statusType, userName, position } = item;
const getRoleTranslation = () => {
switch (role) {
case "owner":
return t("Common:Owner");
case "admin":
return t("Administrator");
case "guest":
return t("Common:Guest");
default:
return t("Common:User");
}
};
const userRole = getRoleTranslation();
const nameColor = statusType === "pending" ? "#A3A9AE" : "#333333"; const nameColor = statusType === "pending" ? "#A3A9AE" : "#333333";
const sideInfoColor = statusType === "pending" ? "#D0D5DA" : "#A3A9AE"; const sideInfoColor = statusType === "pending" ? "#D0D5DA" : "#A3A9AE";
@ -93,20 +78,20 @@ const PeopleTableRow = (props) => {
<TableCell> <TableCell>
<Text <Text
type="page" type="page"
title={userRole} title={position}
fontSize="12px" fontSize="12px"
fontWeight={400} fontWeight={400}
color={sideInfoColor} color={sideInfoColor}
truncate truncate
> >
{userRole} {position}
</Text> </Text>
</TableCell> </TableCell>
<TableCell> <TableCell>
<Text <Text
style={{ display: "none" }} //TODO: style={{ display: "none" }} //TODO:
type="page" type="page"
title={userRole} //title={userRole}
fontSize="12px" fontSize="12px"
fontWeight={400} fontWeight={400}
color={sideInfoColor} color={sideInfoColor}

View File

@ -232,6 +232,7 @@ class UsersStore {
activationStatus, activationStatus,
status, status,
groups, groups,
title,
} = user; } = user;
const statusType = this.getStatusType(user); const statusType = this.getStatusType(user);
const role = this.getUserRole(user); const role = this.getUserRole(user);
@ -264,6 +265,7 @@ class UsersStore {
mobilePhone, mobilePhone,
options, options,
groups, groups,
position: title,
}; };
}); });