From b10e162b194a5ad5658280a46295d6c20a573fec Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 23 Mar 2023 18:10:37 +0200 Subject: [PATCH] UI: Add new notification recipient types --- .../recipient-notification-dialog.componet.ts | 10 ++++++++-- .../src/app/shared/models/notification.models.ts | 14 +++++++++++++- .../src/assets/locale/locale.constant-en_US.json | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts index f0a0b0aa3c..20e75ea195 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts @@ -191,8 +191,14 @@ export class RecipientNotificationDialogComponent extends private allowNotificationTargetConfigTypes(): NotificationTargetConfigType[] { if (this.isSysAdmin()) { - return [NotificationTargetConfigType.ALL_USERS, NotificationTargetConfigType.TENANT_ADMINISTRATORS]; + return [ + NotificationTargetConfigType.ALL_USERS, + NotificationTargetConfigType.TENANT_ADMINISTRATORS, + NotificationTargetConfigType.AFFECTED_TENANT_ADMINISTRATORS, + NotificationTargetConfigType.SYSTEM_ADMINISTRATORS + ]; } - return Object.values(NotificationTargetConfigType); + return Object.values(NotificationTargetConfigType).filter(type => + type !== NotificationTargetConfigType.AFFECTED_TENANT_ADMINISTRATORS && type !== NotificationTargetConfigType.SYSTEM_ADMINISTRATORS); } } diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index d4f9f882f4..14342fabf4 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -357,7 +357,9 @@ export enum NotificationTargetConfigType { CUSTOMER_USERS = 'CUSTOMER_USERS', USER_LIST = 'USER_LIST', ORIGINATOR_ENTITY_OWNER_USERS = 'ORIGINATOR_ENTITY_OWNER_USERS', - AFFECTED_USER = 'AFFECTED_USER' + AFFECTED_USER = 'AFFECTED_USER', + SYSTEM_ADMINISTRATORS = 'SYSTEM_ADMINISTRATORS', + AFFECTED_TENANT_ADMINISTRATORS = 'AFFECTED_TENANT_ADMINISTRATORS' } interface NotificationTargetConfigTypeInfo { @@ -397,6 +399,16 @@ export const NotificationTargetConfigTypeInfoMap = new Map