From 9939711f267f54352c967660b42a1bf75500069a Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Tue, 7 Dec 2021 14:27:06 +0200 Subject: [PATCH] preparation for notification preferences --- .../notifications-screen.component.html | 8 ++++--- .../notifications-translations.ts | 1 - apps/red-ui/src/assets/i18n/en.json | 3 +-- .../red-domain/src/lib/notifications/types.ts | 23 +++++++++---------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html index 8c76795dc..db13ee0bd 100644 --- a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html +++ b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html @@ -18,8 +18,9 @@
-
-
+ + +
-
+ + diff --git a/apps/red-ui/src/app/translations/notifications-translations.ts b/apps/red-ui/src/app/translations/notifications-translations.ts index 04d9977ea..adf4ca5bb 100644 --- a/apps/red-ui/src/app/translations/notifications-translations.ts +++ b/apps/red-ui/src/app/translations/notifications-translations.ts @@ -5,7 +5,6 @@ export const notificationsTranslations: { [key in NotificationType]: string } = [NotificationTypes.ASSIGN_APPROVER]: _('notification.assign-approver'), [NotificationTypes.ASSIGN_REVIEWER]: _('notification.assign-reviewer'), [NotificationTypes.DOCUMENT_APPROVED]: _('notification.document-approved'), - [NotificationTypes.DOSSIER_OWNER_DELETED]: _('notification.dossier-owner-deleted'), [NotificationTypes.DOSSIER_OWNER_REMOVED]: _('notification.dossier-owner-removed'), [NotificationTypes.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'), [NotificationTypes.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'), diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 5f29a6483..d5bce048b 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1288,7 +1288,6 @@ "assign-reviewer": "You have been assigned as reviewer for {fileName} in the {dossierName}!", "document-approved": " {fileName} has been approved!", "dossier-deleted": "Dossier: {dossierName} has been deleted!", - "dossier-owner-deleted": "{dossierName} owner removed!", "dossier-owner-removed": "{dossierName} owner removed!", "dossier-owner-set": " {dossierName} owner changed to {user}!", "no-data": "You currently have no notifications", @@ -1312,7 +1311,7 @@ "own": "Dossiers you own", "reviewer": "Dossiers you are reviewer on" }, - "options-title": "Choose on which category you want to be notified", + "options-title": "Choose on which action you want to be notified", "options": { "document-is-sent-for-approval": "Document is sent for approval", "document-status-changes": "Document status changes", diff --git a/libs/red-domain/src/lib/notifications/types.ts b/libs/red-domain/src/lib/notifications/types.ts index e9788ca3d..fb1465a6f 100644 --- a/libs/red-domain/src/lib/notifications/types.ts +++ b/libs/red-domain/src/lib/notifications/types.ts @@ -1,16 +1,15 @@ export const NotificationTypes = { - ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', - ASSIGN_APPROVER: 'ASSIGN_APPROVER', - UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', - DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', - DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', - DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', - USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', - DOSSIER_DELETED: 'DOSSIER_DELETED', - USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER', - USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER', - USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', - DOSSIER_OWNER_DELETED: 'DOSSIER_OWNER_DELETED', + ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', // "You are assigned as review" + ASSIGN_APPROVER: 'ASSIGN_APPROVER', // "You are assigned as approver" + UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', // "You are unassigned" + DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', // "A document has been approved" + DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', // "Dossier owner has changed" + DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', // "Dossier owner has been removed" + USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', // "You have been assigned to a dossier" + DOSSIER_DELETED: 'DOSSIER_DELETED', // "A dossier has been deleted" + USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER', // "You have been removed from a dossier" + USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER', // "You are promoted to approver" + USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', // "You are denoted to reviewer" } as const; export type NotificationType = keyof typeof NotificationTypes;