Import company and person from csv file (#1236)

* feat: wip implement back-end call csv import

* fix: rebase IconBrandTwitter missing

* feat: person and company csv import

* fix: test & clean

* fix: clean & test
This commit is contained in:
Jérémy M
2023-08-16 23:18:16 +02:00
committed by GitHub
parent 5890354d21
commit 8863bb0035
74 changed files with 950 additions and 312 deletions

View File

@ -1,5 +1,5 @@
import { defaultRSIProps } from '@/spreadsheet-import/components/SpreadsheetImport';
import type { RsiProps } from '@/spreadsheet-import/types';
import { defaultSpreadsheetImportProps } from '@/spreadsheet-import/provider/components/SpreadsheetImport';
import type { SpreadsheetOptions } from '@/spreadsheet-import/types';
const fields = [
{
@ -87,13 +87,14 @@ const fields = [
},
] as const;
const mockComponentBehaviourForTypes = <T extends string>(props: RsiProps<T>) =>
props;
const mockComponentBehaviourForTypes = <T extends string>(
props: SpreadsheetOptions<T>,
) => props;
export const mockRsiValues = mockComponentBehaviourForTypes({
...defaultRSIProps,
...defaultSpreadsheetImportProps,
fields: fields,
onSubmit: (data) => {
onSubmit: async (data) => {
console.log(data.all.map((value) => value));
},
isOpen: true,