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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user