v1.0.0-rc6#6
Merged
Merged
Conversation
Station implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the manager page and API routes to support a new "Stations mode" for order management. The changes allow orders to be tracked and updated at the individual station level, including real-time updates via SSE (Server-Sent Events), and add new API endpoints for station-based order updates and fetching stations. There are also configuration improvements to support these new features.
Stations mode and order management enhancements:
Refactored the
Managerpage (app/manager/page.tsx) to support "Stations mode", including:stationConfirmed,stationCompleted,stationPickedUp), and toggling between normal and stations mode based on display config.order-station-status-update) and order cancellation, ensuring UI stays in sync in real time.Added new API route to update order status for a specific station:
app/api/orders/[id]/stations/[stationId]/route.ts: Implements a PATCH endpoint that proxies status updates to the backend for a specific station, with authentication via cookies. (app/api/orders/[id]/stations/[stationId]/route.tsR1-R35)Added new API route to fetch stations:
app/api/stations/route.ts: Implements a GET endpoint to fetch the list of stations from the backend, requiring authentication.Configuration improvements:
stationsEnabledandfullscreenAlertEnabledflags, enabling or disabling station mode and fullscreen alerts via API.AUTH_URLport in.env.templateto3033to match the development environment.