Skip to content

Commit

Permalink
changed the createdByName to Twenty(Sample data). (#7424)
Browse files Browse the repository at this point in the history
I changed the createdByName from' system' to 'Twenty(Sample Data)'.

---------

Co-authored-by: Félix Malfait <[email protected]>
  • Loading branch information
bmbaji and FelixMalfait authored Oct 4, 2024
1 parent 2f223f3 commit ae2bd66
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
IconCsv,
IconGmail,
IconGoogleCalendar,
IconRobot,
IconSettingsAutomation,
IconUserCircle,
} from 'twenty-ui';
Expand Down Expand Up @@ -52,5 +53,12 @@ export const getSourceEnumOptions = (
AvatarIcon: IconSettingsAutomation,
isIconInverted: true,
},
{
id: 'SYSTEM',
name: 'System',
isSelected: selectedItemIds.includes('SYSTEM'),
AvatarIcon: IconRobot,
isIconInverted: true,
},
];
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
IconCalendar,
IconCsv,
IconGmail,
IconRobot,
} from 'twenty-ui';

type ActorDisplayProps = Partial<FieldActorValue> & {
Expand All @@ -29,12 +30,15 @@ export const ActorDisplay = ({
return IconGmail;
case 'CALENDAR':
return IconCalendar;
case 'SYSTEM':
return IconRobot;
default:
return undefined;
}
}, [source]);

const isIconInverted = source === 'API' || source === 'IMPORT';
const isIconInverted =
source === 'API' || source === 'IMPORT' || source === 'SYSTEM';

return (
<AvatarChip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum FieldActorSource {
API = 'API',
IMPORT = 'IMPORT',
MANUAL = 'MANUAL',
SYSTEM = 'SYSTEM',
}

export const actorCompositeType: CompositeType = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { EntityManager } from 'typeorm';

import { FieldActorSource } from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';

export const AIRBNB_ID = 'c776ee49-f608-4a77-8cc8-6fe96ae1e43f';
export const QONTO_ID = 'f45ee421-8a3e-4aa5-a1cf-7207cc6754e1';
export const STRIPE_ID = '1f70157c-4ea5-4d81-bc49-e1401abfbb94';
Expand Down Expand Up @@ -43,7 +45,7 @@ export const companyPrefillData = async (
addressAddressCountry: 'United States',
employees: 5000,
position: 1,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
},
Expand All @@ -59,7 +61,7 @@ export const companyPrefillData = async (
addressAddressCountry: 'France',
employees: 800,
position: 2,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
},
Expand All @@ -75,7 +77,7 @@ export const companyPrefillData = async (
addressAddressCountry: 'Ireland',
employees: 8000,
position: 3,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
},
Expand All @@ -91,7 +93,7 @@ export const companyPrefillData = async (
addressAddressCountry: 'United States',
employees: 800,
position: 4,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
},
Expand All @@ -107,7 +109,7 @@ export const companyPrefillData = async (
addressAddressCountry: 'United States',
employees: 400,
position: 5,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EntityManager } from 'typeorm';

import { FieldActorSource } from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';
import {
AIRBNB_ID,
FIGMA_ID,
Expand Down Expand Up @@ -40,7 +41,7 @@ export const personPrefillData = async (
avatarUrl:
'https://twentyhq.github.io/placeholder-images/people/image-3.png',
position: 1,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
phonesPrimaryPhoneNumber: '1234567890',
Expand All @@ -55,7 +56,7 @@ export const personPrefillData = async (
avatarUrl:
'https://twentyhq.github.io/placeholder-images/people/image-89.png',
position: 2,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
phonesPrimaryPhoneNumber: '677118822',
Expand All @@ -70,7 +71,7 @@ export const personPrefillData = async (
avatarUrl:
'https://twentyhq.github.io/placeholder-images/people/image-47.png',
position: 3,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
phonesPrimaryPhoneNumber: '987625341',
Expand All @@ -85,7 +86,7 @@ export const personPrefillData = async (
avatarUrl:
'https://twentyhq.github.io/placeholder-images/people/image-40.png',
position: 4,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
phonesPrimaryPhoneNumber: '09882261',
Expand All @@ -100,7 +101,7 @@ export const personPrefillData = async (
avatarUrl:
'https://twentyhq.github.io/placeholder-images/people/image-68.png',
position: 5,
createdBySource: 'MANUAL',
createdBySource: FieldActorSource.SYSTEM,
createdByWorkspaceMemberId: null,
createdByName: 'System',
phonesPrimaryPhoneNumber: '88226173',
Expand Down
7 changes: 4 additions & 3 deletions packages/twenty-ui/src/display/icon/components/TablerIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ export {
IconPilcrow,
IconPlayerPlay,
IconPlayerStop,
IconPower,
IconPlaylistAdd,
IconPlaystationSquare,
IconPlug,
IconPlus,
IconPower,
IconPresentation,
IconProgressCheck,
IconPuzzle,
Expand All @@ -154,6 +155,7 @@ export {
IconReload,
IconRepeat,
IconRestore,
IconRobot,
IconRocket,
IconRotate,
IconRotate2,
Expand Down Expand Up @@ -183,8 +185,7 @@ export {
IconVideo,
IconWand,
IconWorld,
IconX,
IconPlaylistAdd,
IconX
} from '@tabler/icons-react';

export type { TablerIconsProps } from '@tabler/icons-react';

0 comments on commit ae2bd66

Please sign in to comment.