diff --git a/models/controlled-documents/src/index.ts b/models/controlled-documents/src/index.ts index 5f333087a7..fb4860d61a 100644 --- a/models/controlled-documents/src/index.ts +++ b/models/controlled-documents/src/index.ts @@ -1218,6 +1218,28 @@ export function defineNotifications (builder: Builder): void { documents.notification.StateNotification ) + builder.createDoc( + notification.class.NotificationType, + core.space.Model, + { + hidden: false, + generated: false, + allowedForAuthor: true, + label: documents.string.Review, + group: documents.notification.DocumentsNotificationGroup, + field: 'controlledState', + txClasses: [core.class.TxUpdateDoc], + objectClass: documents.class.ControlledDocument, + defaultEnabled: true, + templates: { + textTemplate: '{sender} marked {doc} as reviewed', + htmlTemplate: '
{sender} marked {doc} as reviewed
', + subjectTemplate: '{doc} reviewed' + } + }, + documents.notification.ReviewNotification + ) + builder.createDoc( notification.class.NotificationType, core.space.Model, @@ -1243,7 +1265,11 @@ export function defineNotifications (builder: Builder): void { builder.createDoc(notification.class.NotificationProviderDefaults, core.space.Model, { provider: notification.providers.InboxNotificationProvider, ignoredTypes: [], - enabledTypes: [documents.notification.StateNotification, documents.notification.ContentNotification] + enabledTypes: [ + documents.notification.StateNotification, + documents.notification.ContentNotification, + documents.notification.ReviewNotification + ] }) generateClassNotificationTypes( diff --git a/models/server-controlled-documents/src/index.ts b/models/server-controlled-documents/src/index.ts index a97537945b..1bbeeac478 100644 --- a/models/server-controlled-documents/src/index.ts +++ b/models/server-controlled-documents/src/index.ts @@ -72,6 +72,15 @@ export function createModel (builder: Builder): void { presenter: serverDocuments.function.ControlledDocumentHTMLPresenter }) + builder.mixin( + documents.notification.ReviewNotification, + notification.class.NotificationType, + serverNotification.mixin.TypeMatch, + { + func: serverDocuments.function.DocumentReviewedTypeMatch + } + ) + builder.mixin( documents.notification.CoAuthorsNotification, notification.class.NotificationType, diff --git a/plugins/controlled-documents/src/plugin.ts b/plugins/controlled-documents/src/plugin.ts index 0460f81531..d3460f1875 100644 --- a/plugins/controlled-documents/src/plugin.ts +++ b/plugins/controlled-documents/src/plugin.ts @@ -336,7 +336,8 @@ export const documentsPlugin = plugin(documentsId, { ProductChangeControl: '' as Ref