diff --git a/models/love/src/index.ts b/models/love/src/index.ts index 04d917a624..b04cc27484 100644 --- a/models/love/src/index.ts +++ b/models/love/src/index.ts @@ -35,6 +35,7 @@ import { type Meeting, type MeetingMinutes, type MeetingStatus, + type MeetingSchedule, type Office, type ParticipantInfo, type RequestStatus, @@ -61,7 +62,7 @@ import { UX, TypeBoolean } from '@hcengineering/model' -import calendar, { TEvent } from '@hcengineering/model-calendar' +import calendar, { TEvent, TSchedule } from '@hcengineering/model-calendar' import core, { TAttachedDoc, TDoc } from '@hcengineering/model-core' import preference, { TPreference } from '@hcengineering/model-preference' import presentation from '@hcengineering/model-presentation' @@ -252,6 +253,11 @@ export class TMeetingMinutes extends TAttachedDoc implements MeetingMinutes, Tod todos?: CollectionSize } +@Mixin(love.mixin.MeetingSchedule, calendar.class.Schedule) +export class TMeetingSchedule extends TSchedule implements MeetingSchedule { + room!: Ref +} + export default love export function createModel (builder: Builder): void { @@ -265,7 +271,8 @@ export function createModel (builder: Builder): void { TRoomInfo, TInvite, TMeeting, - TMeetingMinutes + TMeetingMinutes, + TMeetingSchedule ) builder.createDoc( @@ -325,6 +332,19 @@ export function createModel (builder: Builder): void { component: love.component.EditMeetingData }) + builder.createDoc(presentation.class.DocCreateExtension, core.space.Model, { + ofClass: calendar.class.Schedule, + apply: love.function.CreateMeetingSchedule, + components: { + body: love.component.MeetingScheduleData + } + }) + + builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, { + extension: calendar.extensions.EditScheduleExtensions, + component: love.component.EditMeetingScheduleData + }) + builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, { extension: media.extension.StateContext, component: love.component.MediaPopupItemExt diff --git a/plugins/calendar-resources/src/components/CalDavAccess.svelte b/plugins/calendar-resources/src/components/CalDavAccess.svelte index c7a4552d3a..c1a83c062b 100644 --- a/plugins/calendar-resources/src/components/CalDavAccess.svelte +++ b/plugins/calendar-resources/src/components/CalDavAccess.svelte @@ -8,6 +8,8 @@ import { Label, Modal, CheckBox, Spinner, Button, IconCopy, EditBox } from '@hcengineering/ui' import calendar from '@hcengineering/calendar' import { createEventDispatcher, onMount } from 'svelte' + import { slide } from 'svelte/transition' + import { quintOut } from 'svelte/easing' import { getMetadata } from '@hcengineering/platform' import { getCurrentAccount, pickPrimarySocialId, SocialId, SocialIdType } from '@hcengineering/core' import { getAccountClient } from '../utils' @@ -221,8 +223,12 @@ - {#if !wasAccessEnabled} -
+ {#if !wasAccessEnabled && !loading} +
{/if} diff --git a/plugins/calendar-resources/src/components/ScheduleEditor.svelte b/plugins/calendar-resources/src/components/ScheduleEditor.svelte index c4fe8a6441..d05e5d7040 100644 --- a/plugins/calendar-resources/src/components/ScheduleEditor.svelte +++ b/plugins/calendar-resources/src/components/ScheduleEditor.svelte @@ -15,8 +15,14 @@ // --> -