From 6a077d2b09c51166b7b31aad7dbfd736b8a6b434 Mon Sep 17 00:00:00 2001 From: amentis Date: Thu, 4 Jan 2024 16:58:10 +0200 Subject: [PATCH] add more UI notification types --- .../app/core/common/enum/notification-type.ts | 23 +++++++++++-------- .../services/utilities/enum-utils.service.ts | 22 ++++++++++-------- dmp-frontend/src/assets/i18n/en.json | 4 +++- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/dmp-frontend/src/app/core/common/enum/notification-type.ts b/dmp-frontend/src/app/core/common/enum/notification-type.ts index 5844b53e4..d8a223f22 100644 --- a/dmp-frontend/src/app/core/common/enum/notification-type.ts +++ b/dmp-frontend/src/app/core/common/enum/notification-type.ts @@ -1,13 +1,16 @@ export enum NotificationType { - dmpInvitationExternalUser = '065deecd-21bb-44af-9983-e660fdf24bc4', - dmpInvitationExistingUser = '4904dea2-5079-46d3-83be-3a19c9ab45dc', - dmpModified = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb', - dmpFinalised = '90db0b46-42de-bd89-aebf-6f27efeb256e', - descriptionModified = '4fdbfa80-7a71-4a69-b854-67cbb70648f1', - descriptionFinalised = '33790bad-94d4-488a-8ee2-7f6295ca18ea', - mergeAccountConfirmation = 'bfe68845-cb05-4c5a-a03d-29161a7c9660', - removeCredentialConfirmation = 'c9bc3f16-057e-4bba-8a5f-36bd835e5604', - dmpDeposit = '55736f7a-83ab-4190-af43-9d031a6f9612', - descriptionTemplateInvitation = '223bb607-efa1-4ce7-99ec-4beabfef9a8b' + dmpInvitationExternalUserType = '065deecd-21bb-44af-9983-e660fdf24bc4', + dmpInvitationExistingUserType = '4904dea2-5079-46d3-83be-3a19c9ab45dc', + dmpModifiedType = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb', + dmpFinalisedType = '90db0b46-42de-bd89-aebf-6f27efeb256e', + descriptionModifiedType = '4fdbfa80-7a71-4a69-b854-67cbb70648f1', + descriptionFinalisedType = '33790bad-94d4-488a-8ee2-7f6295ca18ea', + mergeAccountConfirmationType = 'bfe68845-cb05-4c5a-a03d-29161a7c9660', + removeCredentialConfirmationType = 'c9bc3f16-057e-4bba-8a5f-36bd835e5604', + dmpDepositType = '55736f7a-83ab-4190-af43-9d031a6f9612', + descriptionTemplateInvitationType = '223bb607-efa1-4ce7-99ec-4beabfef9a8b', + contactSupportType = '5b1d6c52-88f9-418b-9b8a-6f1f963d9ead', + publicContactSupportType = 'b542b606-acc6-4629-adef-4d8ee2f01222' + } \ No newline at end of file diff --git a/dmp-frontend/src/app/core/services/utilities/enum-utils.service.ts b/dmp-frontend/src/app/core/services/utilities/enum-utils.service.ts index 514721cf6..ad1835599 100644 --- a/dmp-frontend/src/app/core/services/utilities/enum-utils.service.ts +++ b/dmp-frontend/src/app/core/services/utilities/enum-utils.service.ts @@ -320,16 +320,18 @@ export class EnumUtils { toNotificationTypeString(status: NotificationType): string { switch (status) { - case NotificationType.dmpInvitationExternalUser: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXTERNAL-USER'); - case NotificationType.dmpInvitationExistingUser: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXISTING-USER'); - case NotificationType.dmpModified: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-MODIFIED'); - case NotificationType.dmpFinalised: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-FINALISED'); - case NotificationType.descriptionModified: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-MODIFIED'); - case NotificationType.descriptionFinalised: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-FINALISED'); - case NotificationType.mergeAccountConfirmation: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.MERGE-ACCOUNT-CONFIRMATION'); - case NotificationType.removeCredentialConfirmation: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.REMOVE-CREDENTIAL-CONFIRMATION'); - case NotificationType.dmpDeposit: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-DEPOSIT'); - case NotificationType.descriptionTemplateInvitation: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-TEMPLATE-INVITATION'); + case NotificationType.dmpInvitationExternalUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXTERNAL-USER'); + case NotificationType.dmpInvitationExistingUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXISTING-USER'); + case NotificationType.dmpModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-MODIFIED'); + case NotificationType.dmpFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-FINALISED'); + case NotificationType.descriptionModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-MODIFIED'); + case NotificationType.descriptionFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-FINALISED'); + case NotificationType.mergeAccountConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.MERGE-ACCOUNT-CONFIRMATION'); + case NotificationType.removeCredentialConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.REMOVE-CREDENTIAL-CONFIRMATION'); + case NotificationType.dmpDepositType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-DEPOSIT'); + case NotificationType.descriptionTemplateInvitationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-TEMPLATE-INVITATION'); + case NotificationType.contactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.CONTACT-SUPPORT'); + case NotificationType.publicContactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PUBLIC-CONTACT-SUPPORT'); } } } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index be0f51e0f..4699bf8e6 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -2272,7 +2272,9 @@ "MERGE-ACCOUNT-CONFIRMATION": "Merge Account Confirmation", "REMOVE-CREDENTIAL-CONFIRMATION": "Remove Credential Confirmation", "DMP-DEPOSIT": "DMP Deposit", - "DESCRIPTION-TEMPLATE-INVITATION": "Description Template Invitation" + "DESCRIPTION-TEMPLATE-INVITATION": "Description Template Invitation", + "CONTACT-SUPPORT": "Contact Support", + "PUBLIC-CONTACT-SUPPORT": "Public Contact Support" } }, "ADDRESEARCHERS-EDITOR": {