notification fix

This commit is contained in:
Timo Bejan 2021-10-11 14:34:34 +03:00
parent 49584140ee
commit c944ecbc62
4 changed files with 5 additions and 2 deletions

View File

@ -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),
});

View File

@ -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',

View File

@ -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'),

View File

@ -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": " <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner changed to <b>{user}</b>!",
"unassigned-from-file": "You have been unassigned from <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> in the <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a><b>!",
"user-becomes-dossier-member": "<b>{user}</b> joined dossier: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b>!",
"dossier-deleted": "Dossier: <b{dossierName}</b> has been deleted!",
"user-demoted-to-reviewer": "<b>{user}</b> demoted to reviewer in dossier: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b>!",
"user-promoted-to-approver": "<b>{user}</b> promoted to approver in dossier: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b>!",
"user-removed-as-dossier-member": "<b>{user}</b> removed as a member of: <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> !"