Added the Real Time Admin Dashboard Notification#186
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a real-time notification channel for admin dashboard order updates by introducing an SSE-based notification service and wiring it into order creation/status updates, then exposing a dashboard endpoint for clients to subscribe per-branch.
Changes:
- Replaced the old
OrderNotificationServiceconcrete class with an interface and addedOrderNotificationServiceImplusingSseEmitterfan-out per branch. - Updated
OrderServiceImplto publish notifications on new orders and status changes via the injected notification service. - Extended dashboard service/controller to provide an SSE subscription endpoint for branch notifications.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| RestroHub/src/main/java/com/restroly/qrmenu/order/service/OrderNotificationService.java | Converts notification contract to an interface and adds SSE subscription method. |
| RestroHub/src/main/java/com/restroly/qrmenu/order/service/impl/OrderServiceImpl.java | Injects notification service and triggers events on order create/status update. |
| RestroHub/src/main/java/com/restroly/qrmenu/order/service/impl/OrderNotificationServiceImpl.java | Implements SSE emitter registry and broadcast logic for order events. |
| RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/service/DashboardService.java | Adds API to switch on branch notifications (SSE). |
| RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/service/DashboardServiceImpl.java | Validates branch existence and delegates subscription to notification service. |
| RestroHub/src/main/java/com/restroly/qrmenu/admin/dashboard/controller/DashboardController.java | Exposes SSE stream endpoint for admin dashboard notifications. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
that can create PR conflicts with other contributors who are already working Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Changes made:- |
Issue Link
Closes #127
Changes Made
Type of Change
Testing Performed
Backend Testing
How to test
open many command prompts and setup listening of notification then place orders and see the notifications are comming or not
Additional Notes