preparation for notification preferences

This commit is contained in:
Timo Bejan 2021-12-07 14:27:06 +02:00
parent 6c36dfdd30
commit 9939711f26
4 changed files with 17 additions and 18 deletions

View File

@ -18,8 +18,9 @@
<div class="statement" translate="notifications-screen.options-title"></div> <div class="statement" translate="notifications-screen.options-title"></div>
<div class="group" *ngFor="let key of notificationGroupsKeys; let i = index"> <!-- <div class="group" -->
<div class="group-title" [translate]="translations[key]"></div> <ng-container *ngFor="let key of notificationGroupsKeys; let i = index">
<!-- <div class="group-title" [translate]="translations[key]"></div>-->
<div class="iqser-input-group"> <div class="iqser-input-group">
<mat-checkbox <mat-checkbox
*ngFor="let preference of notificationGroupsValues[i]" *ngFor="let preference of notificationGroupsValues[i]"
@ -30,7 +31,8 @@
{{ translations[preference] | translate }} {{ translations[preference] | translate }}
</mat-checkbox> </mat-checkbox>
</div> </div>
</div> <!-- </div>-->
</ng-container>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,7 +5,6 @@ export const notificationsTranslations: { [key in NotificationType]: string } =
[NotificationTypes.ASSIGN_APPROVER]: _('notification.assign-approver'), [NotificationTypes.ASSIGN_APPROVER]: _('notification.assign-approver'),
[NotificationTypes.ASSIGN_REVIEWER]: _('notification.assign-reviewer'), [NotificationTypes.ASSIGN_REVIEWER]: _('notification.assign-reviewer'),
[NotificationTypes.DOCUMENT_APPROVED]: _('notification.document-approved'), [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_REMOVED]: _('notification.dossier-owner-removed'),
[NotificationTypes.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'), [NotificationTypes.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'),
[NotificationTypes.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'), [NotificationTypes.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'),

View File

@ -1288,7 +1288,6 @@
"assign-reviewer": "You have been assigned as reviewer for <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> in the <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a><b>!", "assign-reviewer": "You have been assigned as reviewer for <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> in the <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a><b>!",
"document-approved": " <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> has been approved!", "document-approved": " <b><a href=\"{fileHref}\" target=\"_blank\">{fileName}</a></b> has been approved!",
"dossier-deleted": "Dossier: <b>{dossierName}</b> has been deleted!", "dossier-deleted": "Dossier: <b>{dossierName}</b> has been deleted!",
"dossier-owner-deleted": "<b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner removed!",
"dossier-owner-removed": "<b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner removed!", "dossier-owner-removed": "<b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner removed!",
"dossier-owner-set": " <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner changed to <b>{user}</b>!", "dossier-owner-set": " <b><a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a></b> owner changed to <b>{user}</b>!",
"no-data": "You currently have no notifications", "no-data": "You currently have no notifications",
@ -1312,7 +1311,7 @@
"own": "Dossiers you own", "own": "Dossiers you own",
"reviewer": "Dossiers you are reviewer on" "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": { "options": {
"document-is-sent-for-approval": "Document is sent for approval", "document-is-sent-for-approval": "Document is sent for approval",
"document-status-changes": "Document status changes", "document-status-changes": "Document status changes",

View File

@ -1,16 +1,15 @@
export const NotificationTypes = { export const NotificationTypes = {
ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', // "You are assigned as review"
ASSIGN_APPROVER: 'ASSIGN_APPROVER', ASSIGN_APPROVER: 'ASSIGN_APPROVER', // "You are assigned as approver"
UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', // "You are unassigned"
DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', // "A document has been approved"
DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', // "Dossier owner has changed"
DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', // "Dossier owner has been removed"
USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', // "You have been assigned to a dossier"
DOSSIER_DELETED: 'DOSSIER_DELETED', DOSSIER_DELETED: 'DOSSIER_DELETED', // "A dossier has been deleted"
USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER', 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', USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER', // "You are promoted to approver"
USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', // "You are denoted to reviewer"
DOSSIER_OWNER_DELETED: 'DOSSIER_OWNER_DELETED',
} as const; } as const;
export type NotificationType = keyof typeof NotificationTypes; export type NotificationType = keyof typeof NotificationTypes;