feat: refactor schema builder and resolver builder (#2215)
* feat: wip refactor schema builder * feat: wip store types and first queries generation * feat: refactor schema-builder and resolver-builder * fix: clean & small type fix * fix: avoid breaking change * fix: remove util from pg-graphql classes * fix: required default fields * Refactor frontend accordingly --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -26,7 +26,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'email',
|
||||
label: 'Email',
|
||||
Icon: IconMail,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
metadata: {
|
||||
fieldName: 'email',
|
||||
placeHolder: 'Email',
|
||||
@ -36,7 +36,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'company',
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'relation',
|
||||
type: 'RELATION',
|
||||
metadata: {
|
||||
fieldName: 'company',
|
||||
relationType: Entity.Company,
|
||||
@ -53,7 +53,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'phone',
|
||||
label: 'Phone',
|
||||
Icon: IconPhone,
|
||||
type: 'phone',
|
||||
type: 'PHONE',
|
||||
metadata: {
|
||||
fieldName: 'phone',
|
||||
placeHolder: 'Phone',
|
||||
@ -63,7 +63,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'jobTitle',
|
||||
label: 'Job Title',
|
||||
Icon: IconBriefcase,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
metadata: {
|
||||
fieldName: 'jobTitle',
|
||||
placeHolder: 'Job Title',
|
||||
@ -73,7 +73,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'city',
|
||||
label: 'City',
|
||||
Icon: IconMap,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
metadata: {
|
||||
fieldName: 'city',
|
||||
placeHolder: 'City',
|
||||
@ -83,7 +83,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'linkedinUrl',
|
||||
label: 'Linkedin URL',
|
||||
Icon: IconBrandLinkedin,
|
||||
type: 'url',
|
||||
type: 'URL',
|
||||
metadata: {
|
||||
fieldName: 'linkedinUrl',
|
||||
placeHolder: 'Linkedin URL',
|
||||
@ -93,7 +93,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'xUrl',
|
||||
label: 'X URL',
|
||||
Icon: IconBrandX,
|
||||
type: 'url',
|
||||
type: 'URL',
|
||||
metadata: {
|
||||
fieldName: 'xUrl',
|
||||
placeHolder: 'X URL',
|
||||
@ -103,7 +103,7 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendar,
|
||||
type: 'date',
|
||||
type: 'DATE',
|
||||
metadata: {
|
||||
fieldName: 'createdAt',
|
||||
},
|
||||
|
||||
@ -16,25 +16,25 @@ export const personTableFilterDefinitions: FilterDefinitionByEntity<Person>[] =
|
||||
fieldId: 'firstName',
|
||||
label: 'First name',
|
||||
Icon: IconUser,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'lastName',
|
||||
label: 'Last name',
|
||||
Icon: IconUser,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'email',
|
||||
label: 'Email',
|
||||
Icon: IconMail,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'companyId',
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'entity',
|
||||
type: 'ENTITY',
|
||||
// TODO: replace this with a component that selects the dropdown to use based on the entity type
|
||||
entitySelectComponent: <FilterDropdownCompanySearchSelect />,
|
||||
},
|
||||
@ -42,18 +42,18 @@ export const personTableFilterDefinitions: FilterDefinitionByEntity<Person>[] =
|
||||
fieldId: 'phone',
|
||||
label: 'Phone',
|
||||
Icon: IconPhone,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
type: 'date',
|
||||
type: 'DATE',
|
||||
},
|
||||
{
|
||||
fieldId: 'city',
|
||||
label: 'City',
|
||||
Icon: IconMap,
|
||||
type: 'text',
|
||||
type: 'TEXT',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user