Create fields for calendar and messaging settings v2 (#6049)

Create fields for calendar and messaging settings v2
This commit is contained in:
bosiraphael
2024-06-27 16:23:25 +02:00
committed by GitHub
parent 86fa6ec85f
commit ac7d905c84
3 changed files with 107 additions and 0 deletions

View File

@ -40,6 +40,13 @@ export enum CalendarChannelSyncStage {
FAILED = 'FAILED',
}
export enum CalendarChannelContactAutoCreationPolicy {
AS_PARTICIPANT_AND_ORGANIZER = 'AS_PARTICIPANT_AND_ORGANIZER',
AS_PARTICIPANT = 'AS_PARTICIPANT',
AS_ORGANIZER = 'AS_ORGANIZER',
NONE = 'NONE',
}
@WorkspaceEntity({
standardId: STANDARD_OBJECT_IDS.calendarChannel,
namePlural: 'calendarChannels',
@ -186,6 +193,44 @@ export class CalendarChannelWorkspaceEntity extends BaseWorkspaceEntity {
})
isContactAutoCreationEnabled: boolean;
@WorkspaceField({
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.contactAutoCreationPolicy,
type: FieldMetadataType.SELECT,
label: 'Contact auto creation policy',
description:
'Automatically create records for people you participated with in an event.',
icon: 'IconUserCircle',
options: [
{
value:
CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT_AND_ORGANIZER,
label: 'As Participant and Organizer',
color: 'green',
position: 0,
},
{
value: CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT,
label: 'As Participant',
color: 'orange',
position: 1,
},
{
value: CalendarChannelContactAutoCreationPolicy.AS_ORGANIZER,
label: 'As Organizer',
color: 'blue',
position: 2,
},
{
value: CalendarChannelContactAutoCreationPolicy.NONE,
label: 'None',
color: 'red',
position: 3,
},
],
defaultValue: `'${CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT_AND_ORGANIZER}'`,
})
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy;
@WorkspaceField({
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
type: FieldMetadataType.BOOLEAN,