Fix issues with one to many activity targets (#15656)
This PR fixes issues with one to many activity target bugs described here : https://github.com/twentyhq/twenty/issues/14280#issuecomment-3490170714 It also improves the request that fetches notes and tasks in index pages, to only fetch the notes and tasks identifier fields, thus reducing the amount of network load. Fixes https://github.com/twentyhq/twenty/issues/14280
This commit is contained in:
@@ -74,15 +74,6 @@ export const RecordChip = ({
|
||||
|
||||
// TODO temporary until we create a record show page for Workspaces members
|
||||
|
||||
const avatarChip = (
|
||||
<AvatarChip
|
||||
placeholder={recordChipData.name}
|
||||
placeholderColorSeed={record.id}
|
||||
avatarType={recordChipData.avatarType}
|
||||
avatarUrl={recordChipData.avatarUrl ?? ''}
|
||||
/>
|
||||
);
|
||||
|
||||
if (
|
||||
forceDisableClick ||
|
||||
objectNameSingular === CoreObjectNameSingular.WorkspaceMember
|
||||
@@ -94,7 +85,16 @@ export const RecordChip = ({
|
||||
maxWidth={maxWidth}
|
||||
className={className}
|
||||
variant={ChipVariant.Transparent}
|
||||
leftComponent={isIconHidden ? null : avatarChip}
|
||||
leftComponent={
|
||||
isIconHidden ? null : (
|
||||
<AvatarChip
|
||||
placeholder={recordChipData.name}
|
||||
placeholderColorSeed={record.id}
|
||||
avatarType={recordChipData.avatarType}
|
||||
avatarUrl={recordChipData.avatarUrl ?? ''}
|
||||
/>
|
||||
)
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -105,7 +105,16 @@ export const RecordChip = ({
|
||||
maxWidth={maxWidth}
|
||||
label={recordChipData.name}
|
||||
isLabelHidden={isLabelHidden}
|
||||
leftComponent={isIconHidden ? null : avatarChip}
|
||||
leftComponent={
|
||||
isIconHidden ? null : (
|
||||
<AvatarChip
|
||||
placeholder={recordChipData.name}
|
||||
placeholderColorSeed={record.id}
|
||||
avatarType={recordChipData.avatarType}
|
||||
avatarUrl={recordChipData.avatarUrl ?? ''}
|
||||
/>
|
||||
)
|
||||
}
|
||||
className={className}
|
||||
variant={
|
||||
variant ??
|
||||
|
||||
Reference in New Issue
Block a user