Components - Notification Box
This Advanced Topic will add information about Support Tickets across the top of the Dashboard.
NOTE: This tutorial is built upon the foundation of the Support Ticket application.
1. Define Ticket Status codebook
- Type
Ctrl + Shift + C; click Codebook - Set
Nameto: Ticket Status - Verify that
Create Display Attributeis set to: Name - Click
Finish
**— ** - On the Ticket Status codebook, click
Edit Entries - Copy and paste the entries from the table below (without table headers)
| Code | Name |
|---|---|
| NEW | New |
| IN_PROGRESS | In Progress |
| CLOSED | Closed |
- Click
OK - Save changes:
Ctrl + S
2. Update your Ticket entity
- Go to Data > Entities and double-click Ticket
- In Data Definition > References, click
Add New Reference - Set
Reference Typeto: Codebook - Set
Targetto: TicketStatus - Set
Please select default valuesto: NEW - Click
Create References
3. Go to the Dashboard
- Go to UI > Dashboard.
- Open a Dashboard (or create a new one)
- Go to Simple Components, select Notification Box
4. Establish the Text to be Shown
- Double-click the Notification Box
- Set
Titleto: “Support Tickets:” Contentneeds to be defined with C#. Here is basic text that can be adjusted as necessary:
(_, db, ctx) => "**New Tickets:** " + db.TicketSet.Count(t => t.TicketStatus == TicketStatus.NEW) +
"\n\n **Tickets In Progress:** " + db.TicketSet.Count(t => t.TicketStatus == TicketStatus.IN_PROGRESS) +
"\n\n **Closed Tickets:** " + db.TicketSet.Count(t => t.TicketStatus == TicketStatus.CLOSED) +
"\n\n " + (db.TicketSet.Any(t => t.TicketStatus != TicketStatus.CLOSED && t.TicketSeverity == TicketSeverity.CRITICAL) ? "**We have some criticial issues!**" : "**There are no critical issues :)**")
- For
Type, select from Simple (grey), Info (blue), Warning (orange), and Error (red). - If you would like to add an image, set it in
Image. Note: The image needs to have been added in Config > Resources in order to be made available here.