UI: Add new notification recipient types

This commit is contained in:
Vladyslav_Prykhodko 2023-03-23 18:10:37 +02:00
parent 604e591274
commit b10e162b19
3 changed files with 23 additions and 3 deletions

View File

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

View File

@ -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<NotificationTargetCon
name: 'notification.recipient-type.affected-user',
hint: 'notification.recipient-type.affected-user-hint'
}
],
[NotificationTargetConfigType.SYSTEM_ADMINISTRATORS,
{
name: 'notification.recipient-type.system-administrators'
}
],
[NotificationTargetConfigType.AFFECTED_TENANT_ADMINISTRATORS,
{
name: 'notification.recipient-type.affected-tenant-administrators'
}
]
]);

View File

@ -2857,10 +2857,12 @@
"recipient": "Recipient",
"recipient-group": "Recipient group",
"recipient-type": {
"affected-tenant-administrators": "Affected tenant administrators",
"affected-user": "Affected user",
"affected-user-hint": "Affected user hint",
"all-users": "All users",
"customer-users": "Customer users",
"system-administrators": "System administrators",
"tenant-administrators": "Tenant administrators",
"user-filters": "User filter",
"user-list": "User list",