updated notifications preferences keys and grouping
This commit is contained in:
parent
16dd5f263e
commit
773448dcb1
@ -5,34 +5,39 @@ export const NotificationCategories = {
|
|||||||
|
|
||||||
export const NotificationCategoriesValues = Object.values(NotificationCategories);
|
export const NotificationCategoriesValues = Object.values(NotificationCategories);
|
||||||
|
|
||||||
export const OwnDossiersNotificationsTypes = {
|
export const DossierNotificationsTypes = {
|
||||||
dossierStatusChanges: 'dossierStatusChanges',
|
dossierOwnerSet: 'DOSSIER_OWNER_SET',
|
||||||
requestToJoinTheDossier: 'requestToJoinTheDossier',
|
dossierOwnerRemoved: 'DOSSIER_OWNER_REMOVED',
|
||||||
documentStatusChanges: 'documentStatusChanges',
|
userBecomseDossierMember: 'USER_BECOMES_DOSSIER_MEMBER',
|
||||||
documentIsSentForApproval: 'documentIsSentForApproval',
|
userRemovedAsDossierMember: 'USER_REMOVED_AS_DOSSIER_MEMBER',
|
||||||
|
userPromotedToApprover: 'USER_PROMOTED_TO_APPROVER',
|
||||||
|
userDegradedToReviewer: 'USER_DEGRADED_TO_REVIEWER',
|
||||||
|
dossierOwnerDeleted: 'DOSSIER_OWNER_DELETED',
|
||||||
|
dossierDeleted: 'DOSSIER_DELETED',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const OwnDossiersNotificationsTypesValues = Object.values(OwnDossiersNotificationsTypes);
|
export const DossierNotificationsTypesValues = Object.values(DossierNotificationsTypes);
|
||||||
|
|
||||||
export const ReviewerOnDossiersNotificationsTypes = {
|
export const DocumentNotificationsTypes = {
|
||||||
whenIAmAssignedOnADocument: 'whenIAmAssignedOnADocument',
|
assignReviewer: 'ASSIGN_REVIEWER',
|
||||||
whenIAmUnassignedFromADocument: 'whenIAmUnassignedFromADocument',
|
assignApprover: 'ASSIGN_APPROVER',
|
||||||
whenADocumentIsApproved: 'whenADocumentIsApproved',
|
unassignedFromFile: 'UNASSIGNED_FROM_FILE',
|
||||||
|
// documentUnderReview: 'DOCUMENT_UNDER_REVIEW',
|
||||||
|
// documentUnderApproval: 'DOCUMENT_UNDER_APPROVAL',
|
||||||
|
documentApproved: 'DOCUMENT_APPROVED',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const ReviewerOnDossiersNotificationsTypesValues = Object.values(ReviewerOnDossiersNotificationsTypes);
|
export const DocumentNotificationsTypesValues = Object.values(DocumentNotificationsTypes);
|
||||||
|
|
||||||
export const ApproverOnDossiersNotificationsTypes = {
|
export const OtherNotificationsTypes = {
|
||||||
whenADocumentIsSentForApproval: 'whenADocumentIsSentForApproval',
|
downloadReady: 'DOWNLOAD_READY',
|
||||||
whenADocumentIsAssignedToAReviewer: 'whenADocumentIsAssignedToAReviewer',
|
|
||||||
whenAReviewerIsUnassignedFromADocument: 'whenAReviewerIsUnassignedFromADocument',
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const ApproverOnDossiersNotificationsTypesValues = Object.values(ApproverOnDossiersNotificationsTypes);
|
export const OtherNotificationsTypesValues = Object.values(OtherNotificationsTypes);
|
||||||
|
|
||||||
export const NotificationGroupsKeys = ['own', 'reviewer', 'approver'] as const;
|
export const NotificationGroupsKeys = ['dossier', 'document', 'other'] as const;
|
||||||
export const NotificationGroupsValues = [
|
export const NotificationGroupsValues = [
|
||||||
OwnDossiersNotificationsTypesValues,
|
DossierNotificationsTypesValues,
|
||||||
ReviewerOnDossiersNotificationsTypesValues,
|
DocumentNotificationsTypesValues,
|
||||||
ApproverOnDossiersNotificationsTypesValues,
|
OtherNotificationsTypesValues,
|
||||||
] as const;
|
] as const;
|
||||||
|
|||||||
@ -18,9 +18,8 @@
|
|||||||
|
|
||||||
<div class="statement" translate="notifications-screen.options-title"></div>
|
<div class="statement" translate="notifications-screen.options-title"></div>
|
||||||
|
|
||||||
<!-- <div class="group" -->
|
<div class="group" *ngFor="let key of notificationGroupsKeys; let i = index">
|
||||||
<ng-container *ngFor="let key of notificationGroupsKeys; let i = index">
|
<div class="group-title" [translate]="translations[key]"></div>
|
||||||
<!-- <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]"
|
||||||
@ -31,8 +30,7 @@
|
|||||||
{{ translations[preference] | translate }}
|
{{ translations[preference] | translate }}
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,19 +6,24 @@ export const notificationsTranslations: { [key: string]: string } = {
|
|||||||
weekly_summary: _('notifications-screen.schedule.weekly'),
|
weekly_summary: _('notifications-screen.schedule.weekly'),
|
||||||
inAppNotifications: _('notifications-screen.category.in-app-notifications'),
|
inAppNotifications: _('notifications-screen.category.in-app-notifications'),
|
||||||
emailNotifications: _('notifications-screen.category.email-notifications'),
|
emailNotifications: _('notifications-screen.category.email-notifications'),
|
||||||
documentIsSentForApproval: _('notifications-screen.options.document-is-sent-for-approval'),
|
DOSSIER_OWNER_SET: _('notifications-screen.options.DOSSIER_OWNER_SET'),
|
||||||
documentStatusChanges: _('notifications-screen.options.document-status-changes'),
|
DOSSIER_OWNER_REMOVED: _('notifications-screen.options.DOSSIER_OWNER_REMOVED'),
|
||||||
dossierStatusChanges: _('notifications-screen.options.dossier-status-changes'),
|
USER_BECOMES_DOSSIER_MEMBER: _('notifications-screen.options.USER_BECOMES_DOSSIER_MEMBER'),
|
||||||
requestToJoinTheDossier: _('notifications-screen.options.request-to-join-the-dossier'),
|
USER_REMOVED_AS_DOSSIER_MEMBER: _('notifications-screen.options.USER_REMOVED_AS_DOSSIER_MEMBER'),
|
||||||
whenADocumentIsApproved: _('notifications-screen.options.when-a-document-is-approved'),
|
USER_PROMOTED_TO_APPROVER: _('notifications-screen.options.USER_PROMOTED_TO_APPROVER'),
|
||||||
whenADocumentIsAssignedToAReviewer: _('notifications-screen.options.when-a-document-is-assigned-to-a-reviewer'),
|
USER_DEGRADED_TO_REVIEWER: _('notifications-screen.options.USER_DEGRADED_TO_REVIEWER'),
|
||||||
whenADocumentIsSentForApproval: _('notifications-screen.options.when-a-document-is-sent-for-approval'),
|
DOSSIER_OWNER_DELETED: _('notifications-screen.options.DOSSIER_OWNER_DELETED'),
|
||||||
whenAReviewerIsUnassignedFromADocument: _('notifications-screen.options.when-a-reviewer-is-unassigned-from-a-document'),
|
DOSSIER_DELETED: _('notifications-screen.options.DOSSIER_DELETED'),
|
||||||
whenIAmAssignedOnADocument: _('notifications-screen.options.when-i-am-assigned-on-a-document'),
|
ASSIGN_REVIEWER: _('notifications-screen.options.ASSIGN_REVIEWER'),
|
||||||
whenIAmUnassignedFromADocument: _('notifications-screen.options.when-i-am-unassigned-from-a-document'),
|
ASSIGN_APPROVER: _('notifications-screen.options.ASSIGN_APPROVER'),
|
||||||
approver: _('notifications-screen.groups.approver'),
|
UNASSIGNED_FROM_FILE: _('notifications-screen.options.UNASSIGNED_FROM_FILE'),
|
||||||
own: _('notifications-screen.groups.own'),
|
DOCUMENT_UNDER_REVIEW: _('notifications-screen.options.DOCUMENT_UNDER_REVIEW'),
|
||||||
reviewer: _('notifications-screen.groups.reviewer'),
|
DOCUMENT_UNDER_APPROVAL: _('notifications-screen.options.DOCUMENT_UNDER_APPROVAL'),
|
||||||
|
DOCUMENT_APPROVED: _('notifications-screen.options.DOCUMENT_APPROVED'),
|
||||||
|
DOWNLOAD_READY: _('notifications-screen.options.DOWNLOAD_READY'),
|
||||||
|
dossier: _('notifications-screen.groups.dossier'),
|
||||||
|
document: _('notifications-screen.groups.document'),
|
||||||
|
other: _('notifications-screen.groups.other'),
|
||||||
notifications: _('notifications-screen.title'),
|
notifications: _('notifications-screen.title'),
|
||||||
'user-profile': _('user-profile-screen.title'),
|
'user-profile': _('user-profile-screen.title'),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@ -1311,22 +1311,27 @@
|
|||||||
"generic": "Something went wrong... Preferences update failed!"
|
"generic": "Something went wrong... Preferences update failed!"
|
||||||
},
|
},
|
||||||
"groups": {
|
"groups": {
|
||||||
"approver": "Dossiers you are approver on",
|
"dossier": "Dossier related notifications",
|
||||||
"own": "Dossiers you own",
|
"document": "Document related notifications",
|
||||||
"reviewer": "Dossiers you are reviewer on"
|
"other": "Other notifications"
|
||||||
},
|
},
|
||||||
"options-title": "Choose on which action 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",
|
"DOSSIER_OWNER_SET": "When I become the dossier owner",
|
||||||
"document-status-changes": "Document status changes",
|
"DOSSIER_OWNER_REMOVED": "When I loose dossier ownership",
|
||||||
"dossier-status-changes": "Dossier status changes",
|
"USER_BECOMES_DOSSIER_MEMBER": "When a user was added to my dossier",
|
||||||
"request-to-join-the-dossier": "Request to join the dossier",
|
"USER_REMOVED_AS_DOSSIER_MEMBER": "When I loose dossier membership",
|
||||||
"when-a-document-is-approved": "When a document is approved",
|
"USER_PROMOTED_TO_APPROVER": "When I become an Approver in a dossier",
|
||||||
"when-a-document-is-assigned-to-a-reviewer": "When a document is assigned to a reviewer",
|
"USER_DEGRADED_TO_REVIEWER": "When I become a Reviewer in a dossier",
|
||||||
"when-a-document-is-sent-for-approval": "When a document is sent for approval",
|
"DOSSIER_OWNER_DELETED": "When the owner of a dossier got deleted",
|
||||||
"when-a-reviewer-is-unassigned-from-a-document": "When a reviewer is unassigned from a document",
|
"DOSSIER_DELETED": "When a dossier was deleted",
|
||||||
"when-i-am-assigned-on-a-document": "When I am assigned on a document",
|
"ASSIGN_REVIEWER": "When I am assigned to a document as Reviewer",
|
||||||
"when-i-am-unassigned-from-a-document": "When I am unassigned from a document"
|
"ASSIGN_APPROVER": "When I am assigned to a document as Approver",
|
||||||
|
"UNASSIGNED_FROM_FILE": "When I am unassigned from a document",
|
||||||
|
"DOCUMENT_UNDER_REVIEW": "When the document status changes to Under Review",
|
||||||
|
"DOCUMENT_UNDER_APPROVAL": "When the document status changes to Under Approval",
|
||||||
|
"DOCUMENT_APPROVED": "When the document status changes to Approved",
|
||||||
|
"DOWNLOAD_READY": "When a download is ready"
|
||||||
},
|
},
|
||||||
"schedule": {
|
"schedule": {
|
||||||
"daily": "Daily Summary",
|
"daily": "Daily Summary",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user