7182 person avatar is not the same color in emails and calendar (#7185)
Fixes #7182 and displayName in calendar
This commit is contained in:
@ -176,7 +176,7 @@ export const CalendarEventRow = ({
|
|||||||
: participant.displayName
|
: participant.displayName
|
||||||
}
|
}
|
||||||
placeholderColorSeed={
|
placeholderColorSeed={
|
||||||
participant.workspaceMemberId ?? participant.personId
|
participant.workspaceMemberId || participant.personId
|
||||||
}
|
}
|
||||||
type="rounded"
|
type="rounded"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { useRef } from 'react';
|
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
import { useRef } from 'react';
|
||||||
import { useRecoilCallback } from 'recoil';
|
import { useRecoilCallback } from 'recoil';
|
||||||
import { Avatar, GRAY_SCALE } from 'twenty-ui';
|
import { Avatar, GRAY_SCALE } from 'twenty-ui';
|
||||||
|
|
||||||
@ -155,12 +155,20 @@ export const EmailThreadPreview = ({
|
|||||||
<Avatar
|
<Avatar
|
||||||
avatarUrl={thread?.firstParticipant?.avatarUrl}
|
avatarUrl={thread?.firstParticipant?.avatarUrl}
|
||||||
placeholder={thread.firstParticipant.displayName}
|
placeholder={thread.firstParticipant.displayName}
|
||||||
|
placeholderColorSeed={
|
||||||
|
thread.firstParticipant.workspaceMemberId ||
|
||||||
|
thread.firstParticipant.personId
|
||||||
|
}
|
||||||
type="rounded"
|
type="rounded"
|
||||||
/>
|
/>
|
||||||
{thread?.lastTwoParticipants?.[0] && (
|
{thread?.lastTwoParticipants?.[0] && (
|
||||||
<StyledAvatar
|
<StyledAvatar
|
||||||
avatarUrl={thread.lastTwoParticipants[0].avatarUrl}
|
avatarUrl={thread.lastTwoParticipants[0].avatarUrl}
|
||||||
placeholder={thread.lastTwoParticipants[0].displayName}
|
placeholder={thread.lastTwoParticipants[0].displayName}
|
||||||
|
placeholderColorSeed={
|
||||||
|
thread.lastTwoParticipants[0].workspaceMemberId ||
|
||||||
|
thread.lastTwoParticipants[0].personId
|
||||||
|
}
|
||||||
type="rounded"
|
type="rounded"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -93,6 +93,8 @@ export class TimelineCalendarEventService {
|
|||||||
participant.person?.name?.lastName ||
|
participant.person?.name?.lastName ||
|
||||||
participant.workspaceMember?.name.firstName ||
|
participant.workspaceMember?.name.firstName ||
|
||||||
participant.workspaceMember?.name.lastName ||
|
participant.workspaceMember?.name.lastName ||
|
||||||
|
participant.displayName ||
|
||||||
|
participant.handle ||
|
||||||
'',
|
'',
|
||||||
avatarUrl:
|
avatarUrl:
|
||||||
participant.person?.avatarUrl ||
|
participant.person?.avatarUrl ||
|
||||||
|
|||||||
Reference in New Issue
Block a user