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:
80
front/src/modules/companies/utils/fieldsForCompany.tsx
Normal file
80
front/src/modules/companies/utils/fieldsForCompany.tsx
Normal file
@ -0,0 +1,80 @@
|
||||
import {
|
||||
IconBrandLinkedin,
|
||||
IconBuildingSkyscraper,
|
||||
IconMail,
|
||||
IconMap,
|
||||
IconUsers,
|
||||
} from '@/ui/icon';
|
||||
|
||||
export const fieldsForCompany = [
|
||||
{
|
||||
icon: <IconBuildingSkyscraper />,
|
||||
label: 'Name',
|
||||
key: 'name',
|
||||
alternateMatches: ['name', 'company name', 'company'],
|
||||
fieldType: {
|
||||
type: 'input',
|
||||
},
|
||||
example: 'Tim',
|
||||
validations: [
|
||||
{
|
||||
rule: 'required',
|
||||
errorMessage: 'Name is required',
|
||||
level: 'error',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
icon: <IconMail />,
|
||||
label: 'Domain name',
|
||||
key: 'domainName',
|
||||
alternateMatches: ['domain', 'domain name'],
|
||||
fieldType: {
|
||||
type: 'input',
|
||||
},
|
||||
example: 'apple.dev',
|
||||
validations: [
|
||||
{
|
||||
rule: 'required',
|
||||
errorMessage: 'Domain name is required',
|
||||
level: 'error',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
icon: <IconBrandLinkedin />,
|
||||
label: 'Linkedin URL',
|
||||
key: 'linkedinUrl',
|
||||
alternateMatches: ['linkedIn', 'linkedin', 'linkedin url'],
|
||||
fieldType: {
|
||||
type: 'input',
|
||||
},
|
||||
example: 'https://www.linkedin.com/in/apple',
|
||||
},
|
||||
{
|
||||
icon: <IconMap />,
|
||||
label: 'Address',
|
||||
key: 'address',
|
||||
fieldType: {
|
||||
type: 'input',
|
||||
},
|
||||
example: 'Maple street',
|
||||
validations: [
|
||||
{
|
||||
rule: 'required',
|
||||
errorMessage: 'Address is required',
|
||||
level: 'error',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
icon: <IconUsers />,
|
||||
label: 'Employees',
|
||||
key: 'employees',
|
||||
alternateMatches: ['employees', 'total employees', 'number of employees'],
|
||||
fieldType: {
|
||||
type: 'input',
|
||||
},
|
||||
example: '150',
|
||||
},
|
||||
] as const;
|
||||
Reference in New Issue
Block a user