Connect - Import Relation (#13419)

re-opened https://github.com/twentyhq/twenty/pull/13213
This commit is contained in:
Etienne
2025-07-25 09:48:17 +02:00
committed by GitHub
parent ca27995ca6
commit 741924751b
92 changed files with 1612 additions and 1153 deletions

View File

@ -3,10 +3,10 @@ import uniqBy from 'lodash.uniqby';
import { MatchColumnsStepProps } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep';
import { SpreadsheetMatchedOptions } from '@/spreadsheet-import/types/SpreadsheetMatchedOptions';
export const uniqueEntries = <T extends string>(
export const uniqueEntries = (
data: MatchColumnsStepProps['data'],
index: number,
): Partial<SpreadsheetMatchedOptions<T>>[] =>
): Partial<SpreadsheetMatchedOptions>[] =>
uniqBy(
data.map((row) => ({ entry: row[index] })),
'entry',