Skip to content

Commit cea7e79

Browse files
authored
fix(notifications): fix notification display (#1535)
* fix(notifications): fixed notification to display as text and also fixed technical user creation title * fix(notifications): update translation
1 parent 775bece commit cea7e79

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/assets/locales/de/notification.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"content": "Für die App <strong>{{app}}</strong> wurden neue Userrollen hinzugefügt welche sie nun assignen können.\n\nNeue Userrollen: {{roles}}"
5050
},
5151
"TECHNICAL_USER_CREATION": {
52-
"title": "{{appName}} subscription created a new technical user",
52+
"title": "{{offer}} subscription created a new technical user",
5353
"content": "This is a default text and will get enhanced later."
5454
},
5555
"SERVICE_RELEASE_REQUEST": {

src/assets/locales/en/notification.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"content": "New user roles have been added for the app <strong>{{app}}</strong> which you can now assign.\n\nNew Roles: {{roles}}"
5050
},
5151
"TECHNICAL_USER_CREATION": {
52-
"title": "{{appName}} subscription created a new technical user",
52+
"title": "{{offer}} subscription created a new technical user",
5353
"content": "This is a default text and will get enhanced later."
5454
},
5555
"SERVICE_RELEASE_REQUEST": {

src/components/pages/NotificationCenter/NotificationItem.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const NotificationContent = ({
9292
const newUrl = item.contentParsed?.newUrl
9393
const roles = item.contentParsed?.Roles
9494
const userEmail = item.contentParsed?.UserEmail
95+
const serviceName = item.contentParsed?.ServiceName
9596

9697
return (
9798
<>
@@ -112,6 +113,7 @@ const NotificationContent = ({
112113
newUrl,
113114
roles: roles?.join(', '),
114115
useremail: userEmail,
116+
serviceName,
115117
}}
116118
>
117119
<NameLink
@@ -229,6 +231,8 @@ const NotificationConfig = ({ item }: { item: CXNotificationContent }) => {
229231
return <NotificationContent item={item} />
230232
case NotificationType.APP_ROLE_ADDED:
231233
return <NotificationContent item={item} />
234+
case NotificationType.SERVICE_RELEASE_APPROVAL:
235+
return <NotificationContent item={item} />
232236
default:
233237
return <pre>{JSON.stringify(item, null, 2)}</pre>
234238
}

src/features/notification/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export interface NotificationContent {
121121
newUrl?: string
122122
Roles?: string[]
123123
UserEmail?: string
124+
ServiceName?: string
124125
}
125126

126127
export interface CXNotificationContent {

0 commit comments

Comments
 (0)