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:
Lucas Bordeau
2025-11-11 17:19:20 +01:00
committed by GitHub
parent de978960d0
commit 5f3253d5a5
11 changed files with 147 additions and 194 deletions
@@ -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 ??