You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run `cds add notifications`, it will add `notificationstype.json` file with template for a notification type in the project root folder. You can add the notification types in the `notificationtype.json` file for sending the custom notification types.
48
48
49
-
#### **Notification Type Prefix**
49
+
#### Notification Type Prefix
50
50
51
51
To make notification types unique to the application, prefix is added to the type key. By default, `application name` is added as the prefix. You can update the `prefix` if required.
52
52
@@ -83,7 +83,7 @@ In the handler files, connect to the notifications plugin by:
83
83
constalert=awaitcds.connect.to('notifications');
84
84
```
85
85
86
-
#### **Simple Notification with title**
86
+
#### Simple Notification with title
87
87
You can use the following signature to send the simple notification with title
88
88
```js
89
89
alert.notify({
@@ -92,7 +92,7 @@ alert.notify({
92
92
title:"New incident is reported!"
93
93
});
94
94
```
95
-
#### **Simple Notification with title and description**
95
+
#### Simple Notification with title and description
96
96
You can use the following signature to send the simple notification with title and description
97
97
```js
98
98
alert.notify({
@@ -102,7 +102,7 @@ alert.notify({
102
102
description:"Incident titled 'Engine overheating' created by 'customer X' with priority high is assigned to you!"
103
103
});
104
104
```
105
-
#### **Custom Notifications**
105
+
#### Custom Notifications
106
106
You can use the following signature to send the custom notification with pre-defined notification types.
107
107
```js
108
108
alert.notify({
@@ -131,7 +131,7 @@ alert.notify({
131
131
132
132
### Sample Application with notifications
133
133
134
-
#### **In Local Environment**
134
+
#### In Local Environment
135
135
In local environment, when you publish notification, it is mocked to publish the nofication to the console.
136
136
137
137
<imgwidth="1300"alt="Notify to console"style="border-radius:0.5rem;padding:1rem;background:rgb(242424)"src="_assets/notifyToConsole.png">
@@ -142,7 +142,7 @@ In local environment, when you publish notification, it is mocked to publish the
142
142
143
143
As a pre-requisite to publish the notification, you need to have a [destination](https://help.sap.com/docs/build-work-zone-standard-edition/sap-build-work-zone-standard-edition/enabling-notifications-for-custom-apps-on-sap-btp-cloud-foundry#configure-the-destination-to-the-notifications-service) configured to publish the notification. In the `package.json` by default destination name `SAP_Notification` is added, you can modify the destination name that you are configuring.
144
144
145
-
##### **Integrate with SAP Build Work Zone**
145
+
##### Integrate with SAP Build Work Zone
146
146
147
147
Once application is deployed and [integrated with SAP Build Work Zone](https://github.com/cap-js/calesi/tree/main/samples/notifications), you can see the notification under fiori notifications icon!
0 commit comments