Skip to content

feat: implement real-time service request layer (Issue #120)#146

Open
Kajol1906 wants to merge 7 commits into
rdodiya:gssoc_developfrom
Kajol1906:feature/service-request-layer
Open

feat: implement real-time service request layer (Issue #120)#146
Kajol1906 wants to merge 7 commits into
rdodiya:gssoc_developfrom
Kajol1906:feature/service-request-layer

Conversation

@Kajol1906
Copy link
Copy Markdown

Overview
Implements a complete, end-to-end real-time Customer Service Request (Call Waiter / Request Bill) flow across the stack.

Key Changes:

  • Backend: Created a reusable LiveNotificationService (STOMP WebSockets) with JPA persistence and full REST endpoints under a new notification package.
  • Customer Menu: Added a floating Service FAB with a 30-second anti-spam cooldown and an automatic bypass to hide the button for Table 0 (counter QR).
  • Admin Dashboard: Integrated a premium toggle switch in Restaurant Settings to control E2E visibility, and connected the header notification bell to WebSocket alerts showing live requests by table.

Visual preview

bellButtom-customer
bellButtom-customerside

notification-admin
notification-admin

toggle button
toggle1

@Kajol1906
Copy link
Copy Markdown
Author

Hi @rdodiya, just wanted to gently ping you on this PR whenever you have a moment to review it! Since it's been a few days, some new merge conflicts have popped up from recent changes in gssoc_develop. I am happy to resolve the conflicts right away once you've had a chance to review the feature logic. Thank you!

@rdodiya
Copy link
Copy Markdown
Owner

rdodiya commented May 22, 2026

Hi @Kajol1906 ,
Please resolve conflicts once again and test the flow as I can't see toggle buttin for CSR(FAB) . I have review but I can't test the whole flow as toggle button was missing

image image

@rdodiya
Copy link
Copy Markdown
Owner

rdodiya commented May 23, 2026

Hi @Kajol1906,

Currently, we are not fetching/updating the user profile dynamically from the backend, so I understand that the enable/disable feature is not yet integrated with backend profile update APIs.

However, can you please share where I can view this service request button locally after pulling your changes? I checked the screenshot attached below, but I’m unable to identify the exact flow/page.
image

Also, at the moment, the restaurant website is not rendered dynamically. We are currently rendering a static/demo template where data is loaded from defaultData.js.

Reference URL:
http://localhost:3000/Restrohub/ADK/1?tableId=1

If possible, please integrate the service request button into this template flow.

I’m also uploading a video for reference — please check it once.

ServiceRequest.mp4

Additionally, if there are any setup steps/configuration required to test your feature locally, please share those details as well. It will help in reviewing the PR properly.

@Kajol1906
Copy link
Copy Markdown
Author

Hi @rdodiya,

I have successfully implemented all requirements for the real-time service request layer, resolved all recent merge conflicts, and fixed the local testing issues. The complete solution is pushed and available in Pull Request #146.

Here is a quick video demonstration showing the entire flow in action:

recorded video:
https://github.com/user-attachments/assets/198635fe-40cd-4e80-bd5a-54e3d26b3636

What has been resolved and verified:
-Dynamic FAB Toggling: Added a robust visual toggle for Customer Service Requests inside the Admin Profile. Toggling it and clicking Save Changes updates the database dynamically.
-Strict Edit Mode: Toggling is disabled in view mode (read-only) and only works within Edit mode, requiring a click on Save --Changes to persist. Clicking Cancel successfully discards edits and reverts the toggle to the previous state.
-Table 0 Counter Logic: If a customer scans the counter QR code (?tableId=0 or ?table=0), the service FAB is completely hidden, preventing waiter calls from the checkout counter.
-Valid Table Support: The FAB correctly renders and is fully functional on valid table URLs (tested successfully with ?tableId=1, ?tableId=2, etc.).

@rdodiya
Copy link
Copy Markdown
Owner

rdodiya commented May 25, 2026

Hi @Kajol1906 ,
Please work below issues in this PR,

  1. Remove unnecessary logs files

  2. main.jsx - this file should be same as main.jsx of gssoc_develop branch , conflict is not resolved. In conflict, HEAD changes should be accepted if there is no changes of our code

  3. Login.jsx - this file should be same as Login.jsx of gssoc_develop branch , conflict is not resolved. In conflict, HEAD changes should be accepted if there is no changes of our code

  4. build.gradle - added comment regarding extra and unnecessary changes

  5. ServiceRequestType.java - Set the service request types in the .properties file as a comma-separated value instead of hardcoding. added comment in PR

  6. Notification on admin side should be live updated as we are using websocket, currently admin need to refresh the page.

  7. Once customer request for a service like call waiter , service request button should be visible for customer for 2nd/3rd time request after showing success message.

rdodiya added a commit that referenced this pull request May 25, 2026
rdodiya added a commit that referenced this pull request May 25, 2026
* remove duplicate name check in category while creating new one

* Remove mappig of BranchId done in PR #146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants