Don't display unmatched columns in csv import (#6037)

Adding a toggle so that, by default, we don't see dozens of fields but
only the field we matched, during the data validation step in csv export

<img width="785" alt="Screenshot 2024-06-26 at 13 25 36"
src="https://github.com/twentyhq/twenty/assets/6399865/ae558eb5-7461-4bc8-a836-ecff8b6d0dff">
This commit is contained in:
Félix Malfait
2024-06-26 15:37:37 +02:00
committed by GitHub
parent 6599bc136e
commit cd6775da32
5 changed files with 102 additions and 35 deletions

View File

@ -1,4 +1,5 @@
import { defaultSpreadsheetImportProps } from '@/spreadsheet-import/provider/components/SpreadsheetImport';
import { Columns } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep';
import { Fields, SpreadsheetOptions } from '@/spreadsheet-import/types';
import { sleep } from '~/utils/sleep';
@ -88,6 +89,33 @@ const fields = [
},
] as Fields<string>;
export const importedColums: Columns<string> = [
{
header: 'Name',
index: 0,
type: 2,
value: 'name',
},
{
header: 'Surname',
index: 1,
type: 2,
value: 'surname',
},
{
header: 'Age',
index: 2,
type: 2,
value: 'age',
},
{
header: 'Team',
index: 3,
type: 2,
value: 'team',
},
];
const mockComponentBehaviourForTypes = <T extends string>(
props: SpreadsheetOptions<T>,
) => props;