diff --git a/models/calendar/src/index.ts b/models/calendar/src/index.ts index b2c9099059..d5ab86ce8d 100644 --- a/models/calendar/src/index.ts +++ b/models/calendar/src/index.ts @@ -68,6 +68,7 @@ export { calendarId } from '@hcengineering/calendar' export { calendarOperation } from './migration' export const DOMAIN_CALENDAR = 'calendar' as Domain +export const DOMAIN_EVENT = 'event' as Domain @Model(calendar.class.Calendar, core.class.Doc, DOMAIN_CALENDAR) @UX(calendar.string.Calendar, calendar.icon.Calendar) @@ -85,7 +86,7 @@ export class TExternalCalendar extends TCalendar implements ExternalCalendar { externalUser!: string } -@Model(calendar.class.Event, core.class.AttachedDoc, DOMAIN_CALENDAR) +@Model(calendar.class.Event, core.class.AttachedDoc, DOMAIN_EVENT) @UX(calendar.string.Event, calendar.icon.Calendar) export class TEvent extends TAttachedDoc implements Event { declare space: Ref diff --git a/models/calendar/src/migration.ts b/models/calendar/src/migration.ts index de39d23ec4..47b3d13706 100644 --- a/models/calendar/src/migration.ts +++ b/models/calendar/src/migration.ts @@ -24,7 +24,7 @@ import { type MigrationUpgradeClient } from '@hcengineering/model' import { DOMAIN_SPACE } from '@hcengineering/model-core' -import { DOMAIN_CALENDAR } from '.' +import { DOMAIN_CALENDAR, DOMAIN_EVENT } from '.' import calendar from './plugin' async function migrateCalendars (client: MigrationClient): Promise { @@ -136,6 +136,16 @@ export const calendarOperation: MigrateOperation = { { state: 'migrate_calendars', func: migrateCalendars + }, + { + state: 'move-events', + func: async (client) => { + await client.move( + DOMAIN_CALENDAR, + { _class: { $in: client.hierarchy.getDescendants(calendar.class.Event) } }, + DOMAIN_EVENT + ) + } } ]) }, diff --git a/plugins/recruit-resources/src/components/review/CreateReview.svelte b/plugins/recruit-resources/src/components/review/CreateReview.svelte index b74bef5342..b00d4ab55a 100644 --- a/plugins/recruit-resources/src/components/review/CreateReview.svelte +++ b/plugins/recruit-resources/src/components/review/CreateReview.svelte @@ -13,7 +13,7 @@ // limitations under the License. -->