Twenty standard app static options id (#18089)
# Introduction While preparing the twenty-standard as code migration to twenty-app through sdk I've faced permanent field enum update as the id was generated dynamically at each twenty standard app construction Making them deterministic in order to avoid having this noise Won't backfill this on existing workspace as it's not critical and that we will rework the options in the future
This commit is contained in:
+38
-5
@@ -185,29 +185,62 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'OTHER'",
|
||||
options: [
|
||||
{ value: 'ARCHIVE', label: 'Archive', position: 0, color: 'gray' },
|
||||
{ value: 'AUDIO', label: 'Audio', position: 1, color: 'pink' },
|
||||
{ value: 'IMAGE', label: 'Image', position: 2, color: 'yellow' },
|
||||
{
|
||||
id: '20202020-11bb-4a52-b1f2-2159b07eec37',
|
||||
value: 'ARCHIVE',
|
||||
label: 'Archive',
|
||||
position: 0,
|
||||
color: 'gray',
|
||||
},
|
||||
{
|
||||
id: '20202020-ac54-475d-ab0d-e250c28da774',
|
||||
value: 'AUDIO',
|
||||
label: 'Audio',
|
||||
position: 1,
|
||||
color: 'pink',
|
||||
},
|
||||
{
|
||||
id: '20202020-66f7-41ba-81ad-f3371312247f',
|
||||
value: 'IMAGE',
|
||||
label: 'Image',
|
||||
position: 2,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-6113-4e3b-84e3-c617e9f25d0c',
|
||||
value: 'PRESENTATION',
|
||||
label: 'Presentation',
|
||||
position: 3,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-44c1-47c7-8e66-e63558d7233f',
|
||||
value: 'SPREADSHEET',
|
||||
label: 'Spreadsheet',
|
||||
position: 4,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
id: '20202020-cf07-4843-877e-3804cde801d1',
|
||||
value: 'TEXT_DOCUMENT',
|
||||
label: 'Text Document',
|
||||
position: 5,
|
||||
color: 'blue',
|
||||
},
|
||||
{ value: 'VIDEO', label: 'Video', position: 6, color: 'purple' },
|
||||
{ value: 'OTHER', label: 'Other', position: 7, color: 'gray' },
|
||||
{
|
||||
id: '20202020-443b-4159-a434-5fd9fc327639',
|
||||
value: 'VIDEO',
|
||||
label: 'Video',
|
||||
position: 6,
|
||||
color: 'purple',
|
||||
},
|
||||
{
|
||||
id: '20202020-bbca-4802-9146-fd1503e94e58',
|
||||
value: 'OTHER',
|
||||
label: 'Other',
|
||||
position: 7,
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+49
-5
@@ -224,8 +224,15 @@ export const buildCalendarChannelStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'SHARE_EVERYTHING'",
|
||||
options: [
|
||||
{ value: 'METADATA', label: 'Metadata', position: 0, color: 'green' },
|
||||
{
|
||||
id: '20202020-82a0-4859-b356-f5a1d6e3e53d',
|
||||
value: 'METADATA',
|
||||
label: 'Metadata',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-e5ec-4df5-ba3f-66ca2a79c283',
|
||||
value: 'SHARE_EVERYTHING',
|
||||
label: 'Share Everything',
|
||||
position: 1,
|
||||
@@ -271,24 +278,33 @@ export const buildCalendarChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'AS_PARTICIPANT_AND_ORGANIZER'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-47c1-4af1-a8a6-540edeafc55e',
|
||||
value: 'AS_PARTICIPANT_AND_ORGANIZER',
|
||||
label: 'As Participant and Organizer',
|
||||
color: 'green',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '20202020-b3cc-4248-b0d1-c8d45c2418b3',
|
||||
value: 'AS_PARTICIPANT',
|
||||
label: 'As Participant',
|
||||
color: 'orange',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '20202020-84ef-4061-9c22-db596e237ddc',
|
||||
value: 'AS_ORGANIZER',
|
||||
label: 'As Organizer',
|
||||
color: 'blue',
|
||||
position: 2,
|
||||
},
|
||||
{ value: 'NONE', label: 'None', color: 'red', position: 3 },
|
||||
{
|
||||
id: '20202020-f170-491f-9597-0e5817e46c17',
|
||||
value: 'NONE',
|
||||
label: 'None',
|
||||
color: 'red',
|
||||
position: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -344,21 +360,36 @@ export const buildCalendarChannelStandardFlatFieldMetadatas = ({
|
||||
isNullable: true,
|
||||
isUIReadOnly: true,
|
||||
options: [
|
||||
{ value: 'ONGOING', label: 'Ongoing', position: 1, color: 'yellow' },
|
||||
{
|
||||
id: '20202020-ebdc-4fc8-a5c1-4bc6a90fdc3c',
|
||||
value: 'ONGOING',
|
||||
label: 'Ongoing',
|
||||
position: 1,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-7126-4c26-9940-f5807ed87266',
|
||||
value: 'NOT_SYNCED',
|
||||
label: 'Not Synced',
|
||||
position: 2,
|
||||
color: 'blue',
|
||||
},
|
||||
{ value: 'ACTIVE', label: 'Active', position: 3, color: 'green' },
|
||||
{
|
||||
id: '20202020-0302-4201-bf84-aaa26b7ca94e',
|
||||
value: 'ACTIVE',
|
||||
label: 'Active',
|
||||
position: 3,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-6dbb-449d-96b0-092189010f42',
|
||||
value: 'FAILED_INSUFFICIENT_PERMISSIONS',
|
||||
label: 'Failed Insufficient Permissions',
|
||||
position: 4,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-935c-4333-a614-f49ee2ec6aa7',
|
||||
value: 'FAILED_UNKNOWN',
|
||||
label: 'Failed Unknown',
|
||||
position: 5,
|
||||
@@ -385,43 +416,56 @@ export const buildCalendarChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'PENDING_CONFIGURATION'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-60c1-40a3-90ae-61d9ee1083c1',
|
||||
value: 'CALENDAR_EVENT_LIST_FETCH_PENDING',
|
||||
label: 'Calendar event list fetch pending',
|
||||
position: 0,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-8652-444a-b72e-d4b7112179ca',
|
||||
value: 'CALENDAR_EVENT_LIST_FETCH_SCHEDULED',
|
||||
label: 'Calendar event list fetch scheduled',
|
||||
position: 1,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-e87c-4cfe-aefc-635ad34ef223',
|
||||
value: 'CALENDAR_EVENT_LIST_FETCH_ONGOING',
|
||||
label: 'Calendar event list fetch ongoing',
|
||||
position: 2,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-876f-449d-9f09-de5c369ff95f',
|
||||
value: 'CALENDAR_EVENTS_IMPORT_PENDING',
|
||||
label: 'Calendar events import pending',
|
||||
position: 3,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-3d2a-4acd-a0ed-197343b3bf60',
|
||||
value: 'CALENDAR_EVENTS_IMPORT_SCHEDULED',
|
||||
label: 'Calendar events import scheduled',
|
||||
position: 4,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-e762-4152-bb20-29fdd49e1dff',
|
||||
value: 'CALENDAR_EVENTS_IMPORT_ONGOING',
|
||||
label: 'Calendar events import ongoing',
|
||||
position: 5,
|
||||
color: 'orange',
|
||||
},
|
||||
{ value: 'FAILED', label: 'Failed', position: 6, color: 'red' },
|
||||
{
|
||||
id: '20202020-487c-464f-8caa-c6393b82b17c',
|
||||
value: 'FAILED',
|
||||
label: 'Failed',
|
||||
position: 6,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-ba03-4221-b186-402662b68493',
|
||||
value: 'PENDING_CONFIGURATION',
|
||||
label: 'Pending configuration',
|
||||
position: 9,
|
||||
|
||||
+16
-2
@@ -260,19 +260,33 @@ export const buildCalendarEventParticipantStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'NEEDS_ACTION'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-71eb-4724-9947-8aca3bb51140',
|
||||
value: 'NEEDS_ACTION',
|
||||
label: 'Needs Action',
|
||||
position: 0,
|
||||
color: 'orange',
|
||||
},
|
||||
{ value: 'DECLINED', label: 'Declined', position: 1, color: 'red' },
|
||||
{
|
||||
id: '20202020-7a3c-45e8-8bbb-f909a4b821a4',
|
||||
value: 'DECLINED',
|
||||
label: 'Declined',
|
||||
position: 1,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-aec0-4845-8ca5-a3c17f635329',
|
||||
value: 'TENTATIVE',
|
||||
label: 'Tentative',
|
||||
position: 2,
|
||||
color: 'yellow',
|
||||
},
|
||||
{ value: 'ACCEPTED', label: 'Accepted', position: 3, color: 'green' },
|
||||
{
|
||||
id: '20202020-ffbe-4c58-a05b-b00f7fa86c74',
|
||||
value: 'ACCEPTED',
|
||||
label: 'Accepted',
|
||||
position: 3,
|
||||
color: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+2
@@ -247,12 +247,14 @@ export const buildMessageChannelMessageAssociationStandardFlatFieldMetadatas =
|
||||
defaultValue: `'${MessageDirection.INCOMING}'`,
|
||||
options: [
|
||||
{
|
||||
id: '20202020-3075-4e35-b6a1-27db444a4668',
|
||||
value: MessageDirection.INCOMING,
|
||||
label: 'Incoming',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-a15f-4512-9202-391a3c0bbed3',
|
||||
value: MessageDirection.OUTGOING,
|
||||
label: 'Outgoing',
|
||||
position: 1,
|
||||
|
||||
+74
-8
@@ -210,9 +210,22 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'SHARE_EVERYTHING'",
|
||||
options: [
|
||||
{ value: 'METADATA', label: 'Metadata', position: 0, color: 'green' },
|
||||
{ value: 'SUBJECT', label: 'Subject', position: 1, color: 'blue' },
|
||||
{
|
||||
id: '20202020-4548-4830-b3f8-221fd082ebc0',
|
||||
value: 'METADATA',
|
||||
label: 'Metadata',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-6a42-40a8-b81e-28b7e591c598',
|
||||
value: 'SUBJECT',
|
||||
label: 'Subject',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-d520-4cba-8832-5bca315b64f3',
|
||||
value: 'SHARE_EVERYTHING',
|
||||
label: 'Share Everything',
|
||||
position: 2,
|
||||
@@ -256,12 +269,14 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: `'${MessageChannelType.EMAIL}'`,
|
||||
options: [
|
||||
{
|
||||
id: '20202020-1628-4bc0-aae1-1a46c648cf90',
|
||||
value: MessageChannelType.EMAIL,
|
||||
label: 'Email',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-fb11-4da3-80fd-b291cda8deb1',
|
||||
value: MessageChannelType.SMS,
|
||||
label: 'SMS',
|
||||
position: 1,
|
||||
@@ -307,13 +322,26 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'SENT'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-1923-4ffd-907d-be8cc37ecee5',
|
||||
value: 'SENT_AND_RECEIVED',
|
||||
label: 'Sent and Received',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{ value: 'SENT', label: 'Sent', position: 1, color: 'blue' },
|
||||
{ value: 'NONE', label: 'None', position: 2, color: 'red' },
|
||||
{
|
||||
id: '20202020-8f6a-44d8-bdbb-90cf8b919467',
|
||||
value: 'SENT',
|
||||
label: 'Sent',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-b43e-4bc4-840e-d903a69e2ffc',
|
||||
value: 'NONE',
|
||||
label: 'None',
|
||||
position: 2,
|
||||
color: 'red',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -335,12 +363,14 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'ALL_FOLDERS'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-140d-4326-978c-83ca0e9a4d8f',
|
||||
value: 'ALL_FOLDERS',
|
||||
label: 'All folders',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-513a-4b91-9033-5b74b404e2cb',
|
||||
value: 'SELECTED_FOLDERS',
|
||||
label: 'Selected folders',
|
||||
position: 1,
|
||||
@@ -403,18 +433,26 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'NONE'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-2ead-4bd1-aa5d-5005c7a956b4',
|
||||
value: 'GROUP_EMAILS_DELETION',
|
||||
label: 'Group emails deletion',
|
||||
position: 0,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-155d-447d-a36e-6ecbb30fc37c',
|
||||
value: 'GROUP_EMAILS_IMPORT',
|
||||
label: 'Group emails import',
|
||||
position: 1,
|
||||
color: 'green',
|
||||
},
|
||||
{ value: 'NONE', label: 'None', position: 2, color: 'blue' },
|
||||
{
|
||||
id: '20202020-fe98-4018-9f94-f878c22b8ece',
|
||||
value: 'NONE',
|
||||
label: 'None',
|
||||
position: 2,
|
||||
color: 'blue',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -486,21 +524,36 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
isNullable: true,
|
||||
isUIReadOnly: true,
|
||||
options: [
|
||||
{ value: 'ONGOING', label: 'Ongoing', position: 1, color: 'yellow' },
|
||||
{
|
||||
id: '20202020-046b-4bc2-b085-bd69aaa8e577',
|
||||
value: 'ONGOING',
|
||||
label: 'Ongoing',
|
||||
position: 1,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-09ec-4ea6-9a8a-bf48211b67e2',
|
||||
value: 'NOT_SYNCED',
|
||||
label: 'Not Synced',
|
||||
position: 2,
|
||||
color: 'blue',
|
||||
},
|
||||
{ value: 'ACTIVE', label: 'Active', position: 3, color: 'green' },
|
||||
{
|
||||
id: '20202020-2d1b-4d74-9689-9bd28fd3c3f9',
|
||||
value: 'ACTIVE',
|
||||
label: 'Active',
|
||||
position: 3,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-0fb2-4a8b-9f9b-569144a45193',
|
||||
value: 'FAILED_INSUFFICIENT_PERMISSIONS',
|
||||
label: 'Failed Insufficient Permissions',
|
||||
position: 4,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-bde3-415a-a8ac-55ced6014364',
|
||||
value: 'FAILED_UNKNOWN',
|
||||
label: 'Failed Unknown',
|
||||
position: 5,
|
||||
@@ -527,43 +580,56 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'PENDING_CONFIGURATION'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-1f62-4d79-a633-33a0e4fce9a6',
|
||||
value: 'MESSAGE_LIST_FETCH_PENDING',
|
||||
label: 'Messages list fetch pending',
|
||||
position: 0,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-d24f-4c3d-94a6-86c42e0f51d7',
|
||||
value: 'MESSAGE_LIST_FETCH_SCHEDULED',
|
||||
label: 'Messages list fetch scheduled',
|
||||
position: 1,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-8751-408a-ae46-21a51b76be28',
|
||||
value: 'MESSAGE_LIST_FETCH_ONGOING',
|
||||
label: 'Messages list fetch ongoing',
|
||||
position: 2,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-1cfa-4a7d-a82d-93c8e29d0671',
|
||||
value: 'MESSAGES_IMPORT_PENDING',
|
||||
label: 'Messages import pending',
|
||||
position: 3,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-341e-4fbd-9dbf-30a70828ca69',
|
||||
value: 'MESSAGES_IMPORT_SCHEDULED',
|
||||
label: 'Messages import scheduled',
|
||||
position: 4,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-e944-4594-ab81-fdbc53a85026',
|
||||
value: 'MESSAGES_IMPORT_ONGOING',
|
||||
label: 'Messages import ongoing',
|
||||
position: 5,
|
||||
color: 'orange',
|
||||
},
|
||||
{ value: 'FAILED', label: 'Failed', position: 6, color: 'red' },
|
||||
{
|
||||
id: '20202020-f7c5-4756-9084-02f6a0b1a5f8',
|
||||
value: 'FAILED',
|
||||
label: 'Failed',
|
||||
position: 6,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-0ede-4c75-84f1-29c8309829ec',
|
||||
value: 'PENDING_CONFIGURATION',
|
||||
label: 'Pending configuration',
|
||||
position: 7,
|
||||
|
||||
+8
-1
@@ -309,12 +309,19 @@ export const buildMessageFolderStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'NONE'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-dc59-4dd3-92fe-f41c6491a588',
|
||||
value: 'FOLDER_DELETION',
|
||||
label: 'Folder deletion',
|
||||
position: 0,
|
||||
color: 'red',
|
||||
},
|
||||
{ value: 'NONE', label: 'None', position: 1, color: 'blue' },
|
||||
{
|
||||
id: '20202020-aa29-41d3-872b-142174fe6595',
|
||||
value: 'NONE',
|
||||
label: 'None',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+4
@@ -209,24 +209,28 @@ export const buildMessageParticipantStandardFlatFieldMetadatas = ({
|
||||
defaultValue: `'${MessageParticipantRole.FROM}'`,
|
||||
options: [
|
||||
{
|
||||
id: '20202020-761b-4f02-bc28-795f9a67be48',
|
||||
value: MessageParticipantRole.FROM,
|
||||
label: 'From',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-86bc-4cf1-a887-c992c1a0f97f',
|
||||
value: MessageParticipantRole.TO,
|
||||
label: 'To',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-fc2b-431f-805c-650ab60c4f88',
|
||||
value: MessageParticipantRole.CC,
|
||||
label: 'Cc',
|
||||
position: 2,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-fc9c-436e-842a-7e3a9b92766f',
|
||||
value: MessageParticipantRole.BCC,
|
||||
label: 'Bcc',
|
||||
position: 3,
|
||||
|
||||
+14
-2
@@ -221,8 +221,20 @@ export const buildMessageStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'INCOMING'",
|
||||
options: [
|
||||
{ value: 'INCOMING', label: 'Incoming', position: 0, color: 'green' },
|
||||
{ value: 'OUTGOING', label: 'Outgoing', position: 1, color: 'blue' },
|
||||
{
|
||||
id: '20202020-7b52-47d2-abd8-e96a4295f9a6',
|
||||
value: 'INCOMING',
|
||||
label: 'Incoming',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-11cb-42be-8df7-709ad53f90f9',
|
||||
value: 'OUTGOING',
|
||||
label: 'Outgoing',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+23
-3
@@ -173,21 +173,41 @@ export const buildOpportunityStandardFlatFieldMetadatas = ({
|
||||
isNullable: false,
|
||||
defaultValue: "'NEW'",
|
||||
options: [
|
||||
{ value: 'NEW', label: 'New', position: 0, color: 'red' },
|
||||
{
|
||||
id: '20202020-8e01-4afd-9c39-d2063097587a',
|
||||
value: 'NEW',
|
||||
label: 'New',
|
||||
position: 0,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-e685-4671-ac32-26d304dacb6e',
|
||||
value: 'SCREENING',
|
||||
label: 'Screening',
|
||||
position: 1,
|
||||
color: 'purple',
|
||||
},
|
||||
{ value: 'MEETING', label: 'Meeting', position: 2, color: 'sky' },
|
||||
{
|
||||
id: '20202020-dde9-4acc-b5ca-f6531a8ecb4a',
|
||||
value: 'MEETING',
|
||||
label: 'Meeting',
|
||||
position: 2,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
id: '20202020-696e-4f6b-91bc-f413e9b2f654',
|
||||
value: 'PROPOSAL',
|
||||
label: 'Proposal',
|
||||
position: 3,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{ value: 'CUSTOMER', label: 'Customer', position: 4, color: 'yellow' },
|
||||
{
|
||||
id: '20202020-0bb5-4a6f-a8b2-774bbad21104',
|
||||
value: 'CUSTOMER',
|
||||
label: 'Customer',
|
||||
position: 4,
|
||||
color: 'yellow',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+15
-2
@@ -191,14 +191,27 @@ export const buildTaskStandardFlatFieldMetadatas = ({
|
||||
isNullable: true,
|
||||
defaultValue: "'TODO'",
|
||||
options: [
|
||||
{ value: 'TODO', label: 'To do', position: 0, color: 'sky' },
|
||||
{
|
||||
id: '20202020-3d31-4860-ad07-5c4603d44887',
|
||||
value: 'TODO',
|
||||
label: 'To do',
|
||||
position: 0,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
id: '20202020-c559-4f8e-8b8e-21136da8684d',
|
||||
value: 'IN_PROGRESS',
|
||||
label: 'In progress',
|
||||
position: 1,
|
||||
color: 'purple',
|
||||
},
|
||||
{ value: 'DONE', label: 'Done', position: 2, color: 'green' },
|
||||
{
|
||||
id: '20202020-c7a7-43ff-8226-f6a97a32759e',
|
||||
value: 'DONE',
|
||||
label: 'Done',
|
||||
position: 2,
|
||||
color: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+8
-1
@@ -200,12 +200,19 @@ export const buildWorkflowAutomatedTriggerStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'DATABASE_EVENT'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-ccd5-4f45-9292-f6b2fe81b22c',
|
||||
value: 'DATABASE_EVENT',
|
||||
label: 'Database Event',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{ value: 'CRON', label: 'Cron', position: 1, color: 'blue' },
|
||||
{
|
||||
id: '20202020-07b8-4e8f-b218-997ac813c209',
|
||||
value: 'CRON',
|
||||
label: 'Cron',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+43
-6
@@ -186,17 +186,54 @@ export const buildWorkflowRunStandardFlatFieldMetadatas = ({
|
||||
defaultValue: "'NOT_STARTED'",
|
||||
options: [
|
||||
{
|
||||
id: '20202020-2ec6-40d8-b9e1-1b1e567bcca9',
|
||||
value: 'NOT_STARTED',
|
||||
label: 'Not started',
|
||||
position: 0,
|
||||
color: 'gray',
|
||||
},
|
||||
{ value: 'RUNNING', label: 'Running', position: 1, color: 'yellow' },
|
||||
{ value: 'COMPLETED', label: 'Completed', position: 2, color: 'green' },
|
||||
{ value: 'FAILED', label: 'Failed', position: 3, color: 'red' },
|
||||
{ value: 'ENQUEUED', label: 'Enqueued', position: 4, color: 'blue' },
|
||||
{ value: 'STOPPING', label: 'Stopping', position: 5, color: 'orange' },
|
||||
{ value: 'STOPPED', label: 'Stopped', position: 6, color: 'gray' },
|
||||
{
|
||||
id: '20202020-3166-46be-995a-67cb1f4c41d5',
|
||||
value: 'RUNNING',
|
||||
label: 'Running',
|
||||
position: 1,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-cde8-4fb6-840a-2fdc4f021b0c',
|
||||
value: 'COMPLETED',
|
||||
label: 'Completed',
|
||||
position: 2,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-fb77-41c7-bf7c-9be97cce805e',
|
||||
value: 'FAILED',
|
||||
label: 'Failed',
|
||||
position: 3,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-c518-4c95-8255-82a05739c88d',
|
||||
value: 'ENQUEUED',
|
||||
label: 'Enqueued',
|
||||
position: 4,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-e8df-4314-829d-165e296c4eb6',
|
||||
value: 'STOPPING',
|
||||
label: 'Stopping',
|
||||
position: 5,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-729b-44f9-a9c7-0bf401a0b51c',
|
||||
value: 'STOPPED',
|
||||
label: 'Stopped',
|
||||
position: 6,
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+15
-2
@@ -148,9 +148,22 @@ export const buildWorkflowStandardFlatFieldMetadatas = ({
|
||||
isNullable: true,
|
||||
isUIReadOnly: true,
|
||||
options: [
|
||||
{ value: 'DRAFT', label: 'Draft', position: 0, color: 'yellow' },
|
||||
{ value: 'ACTIVE', label: 'Active', position: 1, color: 'green' },
|
||||
{
|
||||
id: '20202020-e9d8-41df-8262-31bb04948366',
|
||||
value: 'DRAFT',
|
||||
label: 'Draft',
|
||||
position: 0,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-e47e-4d57-913a-7b29e1f140ef',
|
||||
value: 'ACTIVE',
|
||||
label: 'Active',
|
||||
position: 1,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-bdfa-4d35-bf5c-e410cccfc765',
|
||||
value: 'DEACTIVATED',
|
||||
label: 'Deactivated',
|
||||
position: 2,
|
||||
|
||||
+22
-3
@@ -217,15 +217,34 @@ export const buildWorkflowVersionStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'DRAFT'",
|
||||
options: [
|
||||
{ value: 'DRAFT', label: 'Draft', position: 0, color: 'yellow' },
|
||||
{ value: 'ACTIVE', label: 'Active', position: 1, color: 'green' },
|
||||
{
|
||||
id: '20202020-e3fe-4308-bb57-931bb8098aa0',
|
||||
value: 'DRAFT',
|
||||
label: 'Draft',
|
||||
position: 0,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '20202020-e9da-428f-8499-bce1b020660b',
|
||||
value: 'ACTIVE',
|
||||
label: 'Active',
|
||||
position: 1,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-e48d-4159-980d-2cc1235fc918',
|
||||
value: 'DEACTIVATED',
|
||||
label: 'Deactivated',
|
||||
position: 2,
|
||||
color: 'orange',
|
||||
},
|
||||
{ value: 'ARCHIVED', label: 'Archived', position: 3, color: 'gray' },
|
||||
{
|
||||
id: '20202020-5e5e-48fe-bcd6-7688ec280b30',
|
||||
value: 'ARCHIVED',
|
||||
label: 'Archived',
|
||||
position: 3,
|
||||
color: 'gray',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
|
||||
+42
-5
@@ -294,20 +294,34 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'SYSTEM'",
|
||||
options: [
|
||||
{ value: 'SYSTEM', label: 'System', position: 0, color: 'turquoise' },
|
||||
{
|
||||
id: '20202020-4b6a-4a08-8506-09bd59ef118e',
|
||||
value: 'SYSTEM',
|
||||
label: 'System',
|
||||
position: 0,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
id: '20202020-6981-4e21-bb11-43ac1081be04',
|
||||
value: 'MONTH_FIRST',
|
||||
label: 'Month First',
|
||||
position: 1,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-bf56-4199-b013-27ee921d046d',
|
||||
value: 'DAY_FIRST',
|
||||
label: 'Day First',
|
||||
position: 2,
|
||||
color: 'purple',
|
||||
},
|
||||
{ value: 'YEAR_FIRST', label: 'Year First', position: 3, color: 'sky' },
|
||||
{
|
||||
id: '20202020-fd23-47d3-b01d-0479c11e5a2d',
|
||||
value: 'YEAR_FIRST',
|
||||
label: 'Year First',
|
||||
position: 3,
|
||||
color: 'sky',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -329,9 +343,27 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({
|
||||
isUIReadOnly: true,
|
||||
defaultValue: "'SYSTEM'",
|
||||
options: [
|
||||
{ value: 'SYSTEM', label: 'System', position: 0, color: 'sky' },
|
||||
{ value: 'HOUR_24', label: '24HRS', position: 1, color: 'red' },
|
||||
{ value: 'HOUR_12', label: '12HRS', position: 2, color: 'purple' },
|
||||
{
|
||||
id: '20202020-349f-4ff8-82be-3eb52e7ec5f5',
|
||||
value: 'SYSTEM',
|
||||
label: 'System',
|
||||
position: 0,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
id: '20202020-592c-4e33-a457-f4dcde59a3fc',
|
||||
value: 'HOUR_24',
|
||||
label: '24HRS',
|
||||
position: 1,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
id: '20202020-151c-43c2-a463-5bc42e5ce434',
|
||||
value: 'HOUR_12',
|
||||
label: '12HRS',
|
||||
position: 2,
|
||||
color: 'purple',
|
||||
},
|
||||
],
|
||||
},
|
||||
standardObjectMetadataRelatedEntityIds,
|
||||
@@ -354,30 +386,35 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({
|
||||
defaultValue: `'${WorkspaceMemberNumberFormatEnum.SYSTEM}'`,
|
||||
options: [
|
||||
{
|
||||
id: '20202020-8b5b-4cee-8449-ca48d7c65c11',
|
||||
value: WorkspaceMemberNumberFormatEnum.SYSTEM,
|
||||
label: 'System',
|
||||
position: 0,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
id: '20202020-657d-409b-9c2a-d8c3b8842859',
|
||||
value: WorkspaceMemberNumberFormatEnum.COMMAS_AND_DOT,
|
||||
label: 'Commas and dot',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
id: '20202020-8703-4475-a92b-42e631851d8b',
|
||||
value: WorkspaceMemberNumberFormatEnum.SPACES_AND_COMMA,
|
||||
label: 'Spaces and comma',
|
||||
position: 2,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
id: '20202020-2ea4-4b99-b72b-bebac01fd7db',
|
||||
value: WorkspaceMemberNumberFormatEnum.DOTS_AND_COMMA,
|
||||
label: 'Dots and comma',
|
||||
position: 3,
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
id: '20202020-9d07-4353-8ce9-d067d639abf5',
|
||||
value: WorkspaceMemberNumberFormatEnum.APOSTROPHE_AND_DOT,
|
||||
label: 'Apostrophe and dot',
|
||||
position: 4,
|
||||
|
||||
+5
-4
@@ -5,7 +5,6 @@ import {
|
||||
type FieldMetadataSettings,
|
||||
type FieldMetadataType,
|
||||
} from 'twenty-shared/types';
|
||||
import { v4 } from 'uuid';
|
||||
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
|
||||
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
@@ -13,6 +12,8 @@ import { type AllStandardObjectFieldName } from 'src/engine/workspace-manager/tw
|
||||
import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-name.type';
|
||||
import { type StandardBuilderArgs } from 'src/engine/workspace-manager/twenty-standard-application/types/metadata-standard-buillder-args.type';
|
||||
|
||||
type WithRequiredId<T> = T & { id: string };
|
||||
|
||||
export type CreateStandardFieldArgs<
|
||||
O extends AllStandardObjectName,
|
||||
T extends FieldMetadataType,
|
||||
@@ -31,8 +32,8 @@ export type CreateStandardFieldArgs<
|
||||
defaultValue?: FieldMetadataDefaultValue<T>;
|
||||
settings?: FieldMetadataSettings<T>;
|
||||
options?:
|
||||
| FieldMetadataDefaultOption[]
|
||||
| FieldMetadataComplexOption[]
|
||||
| WithRequiredId<FieldMetadataDefaultOption>[]
|
||||
| WithRequiredId<FieldMetadataComplexOption>[]
|
||||
| null;
|
||||
};
|
||||
};
|
||||
@@ -88,7 +89,7 @@ export const createStandardFieldFlatMetadata = <
|
||||
standardOverrides: null,
|
||||
defaultValue: defaultValue ?? null,
|
||||
settings: settings ?? null,
|
||||
options: fieldOptions?.map((option) => ({ ...option, id: v4() })) ?? null,
|
||||
options: fieldOptions ?? null,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
morphId: null,
|
||||
|
||||
Reference in New Issue
Block a user