UBER-277 Reminders don't have notifications (#3315)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-06-01 12:48:36 +07:00
committed by GitHub
parent 58ba8fbe07
commit 2dfe0f330c
9 changed files with 79 additions and 7 deletions
+8 -2
View File
@@ -137,6 +137,10 @@ export function createModel (builder: Builder): void {
calendar.ids.CalendarNotificationGroup
)
builder.mixin(calendar.class.Event, core.class.Class, notification.mixin.ClassCollaborators, {
fields: ['participants']
})
builder.createDoc(
notification.class.NotificationType,
core.space.Model,
@@ -145,7 +149,9 @@ export function createModel (builder: Builder): void {
generated: false,
label: calendar.string.Reminder,
group: calendar.ids.CalendarNotificationGroup,
txClasses: [],
txClasses: [core.class.TxMixin],
field: 'state',
txMatch: { 'attributes.state': 'done' },
objectClass: calendar.mixin.Reminder,
allowedForAuthor: true,
templates: {
@@ -168,7 +174,7 @@ export function createModel (builder: Builder): void {
objectClass: calendar.mixin.Reminder,
icon: calendar.icon.Reminder,
txClass: core.class.TxMixin,
label: calendar.string.CreatedReminder,
label: calendar.string.Reminder,
component: calendar.activity.ReminderViewlet,
display: 'emphasized',
editable: false,
+2
View File
@@ -28,6 +28,8 @@
"@hcengineering/core": "^0.6.25",
"@hcengineering/model": "^0.6.4",
"@hcengineering/platform": "^0.6.9",
"@hcengineering/server-notification": "^0.6.0",
"@hcengineering/calendar": "^0.6.9",
"@hcengineering/server-calendar": "^0.6.0",
"@hcengineering/server-core": "^0.6.1"
}
+10
View File
@@ -15,13 +15,23 @@
import { Builder } from '@hcengineering/model'
import calendar from '@hcengineering/calendar'
import core, { Class, Doc } from '@hcengineering/core'
import serverNotification from '@hcengineering/server-notification'
import serverCalendar from '@hcengineering/server-calendar'
import serverCore, { ObjectDDParticipant } from '@hcengineering/server-core'
export { serverCalendarId } from '@hcengineering/server-calendar'
export function createModel (builder: Builder): void {
builder.mixin(calendar.class.Event, core.class.Class, serverNotification.mixin.HTMLPresenter, {
presenter: serverCalendar.function.EventHTMLPresenter
})
builder.mixin(calendar.class.Event, core.class.Class, serverNotification.mixin.TextPresenter, {
presenter: serverCalendar.function.EventTextPresenter
})
builder.mixin<Class<Doc>, ObjectDDParticipant>(
core.class.Doc,
core.class.Class,