4506 change field labels and field type for calendarevent object metadata to match figma (#4679)
* update calendarEvent labels and description to match Figma * modify conferenceUri to conferenceLink with LINK type * update format-google-calendar-event.util to match new conferenceLink * update CalendarEventDetails since overriding the fields is no longer needed * fix mock metadata * generate new uuid for field conferenceLink
This commit is contained in:
@ -136,12 +136,13 @@ export class CalendarEventRepository {
|
||||
location: 'text',
|
||||
iCalUID: 'text',
|
||||
conferenceSolution: 'text',
|
||||
conferenceUri: 'text',
|
||||
conferenceLinkLabel: 'text',
|
||||
conferenceLinkUrl: 'text',
|
||||
recurringEventExternalId: 'text',
|
||||
});
|
||||
|
||||
await this.workspaceDataSourceService.executeRawQuery(
|
||||
`INSERT INTO ${dataSourceSchema}."calendarEvent" ("id", "title", "isCanceled", "isFullDay", "startsAt", "endsAt", "externalCreatedAt", "externalUpdatedAt", "description", "location", "iCalUID", "conferenceSolution", "conferenceUri", "recurringEventExternalId") VALUES ${valuesString}`,
|
||||
`INSERT INTO ${dataSourceSchema}."calendarEvent" ("id", "title", "isCanceled", "isFullDay", "startsAt", "endsAt", "externalCreatedAt", "externalUpdatedAt", "description", "location", "iCalUID", "conferenceSolution", "conferenceLinkLabel", "conferenceLinkUrl", "recurringEventExternalId") VALUES ${valuesString}`,
|
||||
flattenedValues,
|
||||
workspaceId,
|
||||
transactionManager,
|
||||
@ -173,7 +174,8 @@ export class CalendarEventRepository {
|
||||
location: 'text',
|
||||
iCalUID: 'text',
|
||||
conferenceSolution: 'text',
|
||||
conferenceUri: 'text',
|
||||
conferenceLinkLabel: 'text',
|
||||
conferenceLinkUrl: 'text',
|
||||
recurringEventExternalId: 'text',
|
||||
});
|
||||
|
||||
@ -189,10 +191,11 @@ export class CalendarEventRepository {
|
||||
"description" = "newData"."description",
|
||||
"location" = "newData"."location",
|
||||
"conferenceSolution" = "newData"."conferenceSolution",
|
||||
"conferenceUri" = "newData"."conferenceUri",
|
||||
"conferenceLinkLabel" = "newData"."conferenceLinkLabel",
|
||||
"conferenceLinkUrl" = "newData"."conferenceLinkUrl",
|
||||
"recurringEventExternalId" = "newData"."recurringEventExternalId"
|
||||
FROM (VALUES ${valuesString})
|
||||
AS "newData"("title", "isCanceled", "isFullDay", "startsAt", "endsAt", "externalCreatedAt", "externalUpdatedAt", "description", "location", "iCalUID", "conferenceSolution", "conferenceUri", "recurringEventExternalId")
|
||||
AS "newData"("title", "isCanceled", "isFullDay", "startsAt", "endsAt", "externalCreatedAt", "externalUpdatedAt", "description", "location", "iCalUID", "conferenceSolution", "conferenceLinkLabel", "conferenceLinkUrl", "recurringEventExternalId")
|
||||
WHERE "calendarEvent"."iCalUID" = "newData"."iCalUID"`,
|
||||
flattenedValues,
|
||||
workspaceId,
|
||||
|
||||
@ -15,6 +15,7 @@ import { CalendarEventAttendeeObjectMetadata } from 'src/modules/calendar/standa
|
||||
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';
|
||||
import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type';
|
||||
|
||||
@ObjectMetadata({
|
||||
standardId: standardObjectIds.calendarEvent,
|
||||
@ -59,8 +60,8 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
|
||||
@FieldMetadata({
|
||||
standardId: calendarEventStandardFieldIds.startsAt,
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
label: 'Start DateTime',
|
||||
description: 'Start DateTime',
|
||||
label: 'Start Date',
|
||||
description: 'Start Date',
|
||||
icon: 'IconCalendarClock',
|
||||
})
|
||||
@IsNullable()
|
||||
@ -69,8 +70,8 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
|
||||
@FieldMetadata({
|
||||
standardId: calendarEventStandardFieldIds.endsAt,
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
label: 'End DateTime',
|
||||
description: 'End DateTime',
|
||||
label: 'End Date',
|
||||
description: 'End Date',
|
||||
icon: 'IconCalendarClock',
|
||||
})
|
||||
@IsNullable()
|
||||
@ -133,13 +134,14 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
|
||||
conferenceSolution: string;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: calendarEventStandardFieldIds.conferenceUri,
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Conference URI',
|
||||
description: 'Conference URI',
|
||||
standardId: calendarEventStandardFieldIds.conferenceLink,
|
||||
type: FieldMetadataType.LINK,
|
||||
label: 'Meet Link',
|
||||
description: 'Meet Link',
|
||||
icon: 'IconLink',
|
||||
})
|
||||
conferenceUri: string;
|
||||
@IsNullable()
|
||||
conferenceLink: LinkMetadata;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: calendarEventStandardFieldIds.recurringEventExternalId,
|
||||
|
||||
@ -9,7 +9,11 @@ export type CalendarEvent = Omit<
|
||||
| 'calendarChannelEventAssociations'
|
||||
| 'calendarEventAttendees'
|
||||
| 'eventAttendees'
|
||||
>;
|
||||
| 'conferenceLink'
|
||||
> & {
|
||||
conferenceLinkLabel: string;
|
||||
conferenceLinkUrl: string;
|
||||
};
|
||||
|
||||
export type CalendarEventAttendee = Omit<
|
||||
ObjectRecord<CalendarEventAttendeeObjectMetadata>,
|
||||
|
||||
@ -37,7 +37,8 @@ export const formatGoogleCalendarEvent = (
|
||||
iCalUID: event.iCalUID ?? '',
|
||||
conferenceSolution:
|
||||
event.conferenceData?.conferenceSolution?.key?.type ?? '',
|
||||
conferenceUri: event.conferenceData?.entryPoints?.[0]?.uri ?? '',
|
||||
conferenceLinkLabel: event.conferenceData?.entryPoints?.[0]?.uri ?? '',
|
||||
conferenceLinkUrl: event.conferenceData?.entryPoints?.[0]?.uri ?? '',
|
||||
recurringEventExternalId: event.recurringEventId ?? '',
|
||||
attendees:
|
||||
event.attendees?.map((attendee) => ({
|
||||
|
||||
Reference in New Issue
Block a user