2022-03-18 06:37:49 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
2022-09-21 08:08:25 +00:00
|
|
|
import { Doc } from '@hcengineering/core'
|
|
|
|
import { Resources } from '@hcengineering/platform'
|
|
|
|
import { showPopup } from '@hcengineering/ui'
|
2022-03-18 16:07:42 +00:00
|
|
|
import CalendarView from './components/CalendarView.svelte'
|
2022-03-26 17:34:06 +00:00
|
|
|
import SaveEventReminder from './components/SaveEventReminder.svelte'
|
2022-03-23 09:03:41 +00:00
|
|
|
import DateTimePresenter from './components/DateTimePresenter.svelte'
|
2022-03-26 17:34:06 +00:00
|
|
|
import DocReminder from './components/DocReminder.svelte'
|
|
|
|
import PersonsPresenter from './components/PersonsPresenter.svelte'
|
2022-05-12 09:40:22 +00:00
|
|
|
import Events from './components/Events.svelte'
|
2022-03-26 17:34:06 +00:00
|
|
|
import ReminderPresenter from './components/ReminderPresenter.svelte'
|
|
|
|
import ReminderViewlet from './components/activity/ReminderViewlet.svelte'
|
|
|
|
import EditEvent from './components/EditEvent.svelte'
|
2022-06-15 12:00:32 +00:00
|
|
|
import EventPresenter from './components/EventPresenter.svelte'
|
|
|
|
import CreateEvent from './components/CreateEvent.svelte'
|
2022-03-26 17:34:06 +00:00
|
|
|
|
|
|
|
async function saveEventReminder (object: Doc): Promise<void> {
|
|
|
|
showPopup(SaveEventReminder, { objectId: object._id, objectClass: object._class })
|
|
|
|
}
|
2022-03-18 06:37:49 +00:00
|
|
|
|
2022-06-15 12:00:32 +00:00
|
|
|
export enum CalendarMode {
|
|
|
|
Day,
|
|
|
|
Week,
|
|
|
|
Month,
|
|
|
|
Year
|
|
|
|
}
|
|
|
|
|
2022-03-18 06:37:49 +00:00
|
|
|
export default async (): Promise<Resources> => ({
|
|
|
|
component: {
|
2022-03-26 17:34:06 +00:00
|
|
|
EditEvent,
|
|
|
|
ReminderPresenter,
|
2022-03-18 16:07:42 +00:00
|
|
|
PersonsPresenter,
|
2022-03-23 09:03:41 +00:00
|
|
|
CalendarView,
|
2022-05-12 09:40:22 +00:00
|
|
|
Events,
|
2022-03-26 17:34:06 +00:00
|
|
|
DateTimePresenter,
|
|
|
|
DocReminder,
|
2022-06-15 12:00:32 +00:00
|
|
|
EventPresenter,
|
|
|
|
CreateEvent
|
2022-03-26 17:34:06 +00:00
|
|
|
},
|
|
|
|
activity: {
|
|
|
|
ReminderViewlet
|
|
|
|
},
|
|
|
|
actionImpl: {
|
|
|
|
SaveEventReminder: saveEventReminder
|
2022-03-18 06:37:49 +00:00
|
|
|
}
|
|
|
|
})
|