Chore: Edit button on cells should be guessed by the field's type (#1952)
* created custom hook to get Icon Component as per field type * Fix conflicts --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -13,7 +13,6 @@ import {
|
||||
IconCalendar,
|
||||
IconLink,
|
||||
IconMap,
|
||||
IconPencil,
|
||||
IconTarget,
|
||||
IconUserCircle,
|
||||
IconUsers,
|
||||
@ -31,7 +30,6 @@ export const companyShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldName: 'domainName',
|
||||
placeHolder: 'URL',
|
||||
},
|
||||
buttonIcon: IconPencil,
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
key: 'accountOwner',
|
||||
@ -88,7 +86,6 @@ export const companyShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldName: 'xUrl',
|
||||
placeHolder: 'X',
|
||||
},
|
||||
buttonIcon: IconPencil,
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
key: 'createdAt',
|
||||
|
||||
@ -15,7 +15,6 @@ import {
|
||||
IconCalendar,
|
||||
IconMail,
|
||||
IconMap,
|
||||
IconPencil,
|
||||
IconPhone,
|
||||
} from '@/ui/display/icon';
|
||||
import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
|
||||
@ -38,7 +37,6 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
name: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'relation',
|
||||
buttonIcon: IconPencil,
|
||||
metadata: {
|
||||
fieldName: 'company',
|
||||
relationType: Entity.Company,
|
||||
@ -60,7 +58,6 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldName: 'phone',
|
||||
placeHolder: 'Phone',
|
||||
},
|
||||
buttonIcon: IconPencil,
|
||||
} satisfies FieldDefinition<FieldPhoneMetadata>,
|
||||
{
|
||||
key: 'jobTitle',
|
||||
@ -91,7 +88,6 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldName: 'linkedinUrl',
|
||||
placeHolder: 'Linkedin URL',
|
||||
},
|
||||
buttonIcon: IconPencil,
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
key: 'xUrl',
|
||||
@ -102,7 +98,6 @@ export const personShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
fieldName: 'xUrl',
|
||||
placeHolder: 'X URL',
|
||||
},
|
||||
buttonIcon: IconPencil,
|
||||
} satisfies FieldDefinition<FieldURLMetadata>,
|
||||
{
|
||||
key: 'createdAt',
|
||||
|
||||
Reference in New Issue
Block a user