From c944ecbc62724596940c7c43b8dd77e681fa6b06 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Mon, 11 Oct 2021 14:34:34 +0300 Subject: [PATCH] notification fix --- .../app/components/notifications/notifications.component.ts | 2 +- apps/red-ui/src/app/models/notification-types.ts | 1 + apps/red-ui/src/app/translations/notifications-translations.ts | 1 + apps/red-ui/src/assets/i18n/en.json | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/components/notifications/notifications.component.ts b/apps/red-ui/src/app/components/notifications/notifications.component.ts index 299ffcfd4..ba157104a 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.ts +++ b/apps/red-ui/src/app/components/notifications/notifications.component.ts @@ -76,7 +76,7 @@ export class NotificationsComponent { return this._translateService.instant(translation, { fileHref: this._getFileHref(dossierId, fileId), dossierHref: this._getDossierHref(dossierId), - dossierName: this._getDossierName(notification.target?.dossierId), + dossierName: notification.target?.dossierName || this._getDossierName(notification.target?.dossierId), fileName: this._getFileName(notification.target?.dossierId, notification.target?.fileId), user: this._getUsername(notification.userId), }); diff --git a/apps/red-ui/src/app/models/notification-types.ts b/apps/red-ui/src/app/models/notification-types.ts index a8bc30ce5..b1c7823ac 100644 --- a/apps/red-ui/src/app/models/notification-types.ts +++ b/apps/red-ui/src/app/models/notification-types.ts @@ -6,6 +6,7 @@ export enum NotificationTypeEnum { 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', diff --git a/apps/red-ui/src/app/translations/notifications-translations.ts b/apps/red-ui/src/app/translations/notifications-translations.ts index 6259c2e61..4da77e00f 100644 --- a/apps/red-ui/src/app/translations/notifications-translations.ts +++ b/apps/red-ui/src/app/translations/notifications-translations.ts @@ -10,6 +10,7 @@ export const notificationsTranslations: { [key in NotificationType]: string } = [NotificationTypeEnum.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'), [NotificationTypeEnum.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'), [NotificationTypeEnum.USER_BECOMES_DOSSIER_MEMBER]: _('notification.user-becomes-dossier-member'), + [NotificationTypeEnum.DOSSIER_DELETED]: _('notification.dossier-deleted'), [NotificationTypeEnum.USER_DEGRADED_TO_REVIEWER]: _('notification.user-demoted-to-reviewer'), [NotificationTypeEnum.USER_PROMOTED_TO_APPROVER]: _('notification.user-promoted-to-approver'), [NotificationTypeEnum.USER_REMOVED_AS_DOSSIER_MEMBER]: _('notification.user-removed-as-dossier-member'), diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 768576241..949d11775 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1067,7 +1067,7 @@ "with-reason-changes": "Only redactions with reason changes" }, "filter": { - "analysis": "Analysis required", + "analysis": "Analysis pending", "comment": "Comments", "hint": "Hints only", "image": "Images", @@ -1230,6 +1230,7 @@ "dossier-owner-set": " {dossierName} owner changed to {user}!", "unassigned-from-file": "You have been unassigned from {fileName} in the {dossierName}!", "user-becomes-dossier-member": "{user} joined dossier: {dossierName}!", + "dossier-deleted": "Dossier: has been deleted!", "user-demoted-to-reviewer": "{user} demoted to reviewer in dossier: {dossierName}!", "user-promoted-to-approver": "{user} promoted to approver in dossier: {dossierName}!", "user-removed-as-dossier-member": "{user} removed as a member of: {dossierName} !"