4702 rename calendareventattendee to calendareventparticipant (#4761)

Closes #4702
This commit is contained in:
bosiraphael
2024-04-04 14:00:10 +02:00
committed by GitHub
parent 357882c395
commit 85caed3463
36 changed files with 305 additions and 330 deletions

View File

@ -1,5 +1,5 @@
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { calendarEventAttendeeStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { calendarEventParticipantStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
@ -11,7 +11,7 @@ import { CalendarEventObjectMetadata } from 'src/modules/calendar/standard-objec
import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person.object-metadata';
import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata';
export enum CalendarEventAttendeeResponseStatus {
export enum CalendarEventParticipantResponseStatus {
NEEDS_ACTION = 'NEEDS_ACTION',
DECLINED = 'DECLINED',
TENTATIVE = 'TENTATIVE',
@ -19,20 +19,20 @@ export enum CalendarEventAttendeeResponseStatus {
}
@ObjectMetadata({
standardId: standardObjectIds.calendarEventAttendee,
namePlural: 'calendarEventAttendees',
labelSingular: 'Calendar event attendee',
labelPlural: 'Calendar event attendees',
description: 'Calendar event attendees',
standardId: standardObjectIds.calendarEventParticipant,
namePlural: 'calendarEventParticipants',
labelSingular: 'Calendar event participant',
labelPlural: 'Calendar event participants',
description: 'Calendar event participants',
icon: 'IconCalendar',
})
@IsSystem()
@Gate({
featureFlag: 'IS_CALENDAR_ENABLED',
})
export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.calendarEvent,
standardId: calendarEventParticipantStandardFieldIds.calendarEvent,
type: FieldMetadataType.RELATION,
label: 'Event ID',
description: 'Event ID',
@ -42,7 +42,7 @@ export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
calendarEvent: CalendarEventObjectMetadata;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.handle,
standardId: calendarEventParticipantStandardFieldIds.handle,
type: FieldMetadataType.TEXT,
label: 'Handle',
description: 'Handle',
@ -51,7 +51,7 @@ export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.displayName,
standardId: calendarEventParticipantStandardFieldIds.displayName,
type: FieldMetadataType.TEXT,
label: 'Display Name',
description: 'Display Name',
@ -60,7 +60,7 @@ export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
displayName: string;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.isOrganizer,
standardId: calendarEventParticipantStandardFieldIds.isOrganizer,
type: FieldMetadataType.BOOLEAN,
label: 'Is Organizer',
description: 'Is Organizer',
@ -70,43 +70,43 @@ export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
isOrganizer: boolean;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.responseStatus,
standardId: calendarEventParticipantStandardFieldIds.responseStatus,
type: FieldMetadataType.SELECT,
label: 'Response Status',
description: 'Response Status',
icon: 'IconUser',
options: [
{
value: CalendarEventAttendeeResponseStatus.NEEDS_ACTION,
value: CalendarEventParticipantResponseStatus.NEEDS_ACTION,
label: 'Needs Action',
position: 0,
color: 'orange',
},
{
value: CalendarEventAttendeeResponseStatus.DECLINED,
value: CalendarEventParticipantResponseStatus.DECLINED,
label: 'Declined',
position: 1,
color: 'red',
},
{
value: CalendarEventAttendeeResponseStatus.TENTATIVE,
value: CalendarEventParticipantResponseStatus.TENTATIVE,
label: 'Tentative',
position: 2,
color: 'yellow',
},
{
value: CalendarEventAttendeeResponseStatus.ACCEPTED,
value: CalendarEventParticipantResponseStatus.ACCEPTED,
label: 'Accepted',
position: 3,
color: 'green',
},
],
defaultValue: `'${CalendarEventAttendeeResponseStatus.NEEDS_ACTION}'`,
defaultValue: `'${CalendarEventParticipantResponseStatus.NEEDS_ACTION}'`,
})
responseStatus: string;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.person,
standardId: calendarEventParticipantStandardFieldIds.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Person',
@ -117,7 +117,7 @@ export class CalendarEventAttendeeObjectMetadata extends BaseObjectMetadata {
person: PersonObjectMetadata;
@FieldMetadata({
standardId: calendarEventAttendeeStandardFieldIds.workspaceMember,
standardId: calendarEventParticipantStandardFieldIds.workspaceMember,
type: FieldMetadataType.RELATION,
label: 'Workspace Member',
description: 'Workspace Member',

View File

@ -11,7 +11,7 @@ import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/d
import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator';
import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata';
import { CalendarChannelEventAssociationObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-channel-event-association.object-metadata';
import { CalendarEventAttendeeObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-event-attendee.object-metadata';
import { CalendarEventParticipantObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-event-participant.object-metadata';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { calendarEventStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
@ -171,16 +171,16 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
calendarChannelEventAssociations: CalendarChannelEventAssociationObjectMetadata[];
@FieldMetadata({
standardId: calendarEventStandardFieldIds.eventAttendees,
standardId: calendarEventStandardFieldIds.eventParticipants,
type: FieldMetadataType.RELATION,
label: 'Event Attendees',
description: 'Event Attendees',
label: 'Event Participants',
description: 'Event Participants',
icon: 'IconUserCircle',
})
@RelationMetadata({
type: RelationMetadataType.ONE_TO_MANY,
inverseSideTarget: () => CalendarEventAttendeeObjectMetadata,
inverseSideTarget: () => CalendarEventParticipantObjectMetadata,
onDelete: RelationOnDeleteAction.CASCADE,
})
eventAttendees: CalendarEventAttendeeObjectMetadata[];
eventParticipants: CalendarEventParticipantObjectMetadata[];
}