minor fixes(ui): Small UI display fixes (#4190)

This commit is contained in:
John Joyce 2022-02-18 10:12:30 -08:00 committed by GitHub
parent eaf7b02b2a
commit b08784e27a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -37,7 +37,8 @@ export const ExpandedOwner = ({ entityUrn, owner, refetch }: Props) => {
name = entityRegistry.getDisplayName(EntityType.CorpUser, owner.owner);
}
const pictureLink = (owner.owner.__typename === 'CorpUser' && owner.owner.editableInfo?.pictureLink) || undefined;
const pictureLink =
(owner.owner.__typename === 'CorpUser' && owner.owner.editableProperties?.pictureLink) || undefined;
const onDelete = async () => {
try {

View File

@ -61,7 +61,14 @@ export class UserEntity implements Entity<CorpUser> {
};
displayName = (data: CorpUser) => {
return data.editableProperties?.displayName || data.info?.displayName || data.info?.fullName || data.username;
return (
data.editableProperties?.displayName ||
data.properties?.displayName ||
data.properties?.fullName ||
data.info?.displayName || // Deprecated info field
data.info?.fullName || // Deprecated info field
data.username
);
};
getGenericEntityProperties = (user: CorpUser) => {

View File

@ -18,6 +18,7 @@ const AvatarStyled = styled(Avatar)<{ size?: number; $backgroundColor: string }>
.ant-avatar-string {
text-align: center;
top: 0px;
line-height: ${(props) => (props.size ? props.size : 24)}px;
}
`;