Feat: DW website improve #43
Open
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 several improvements and refactoring to the restaurant management backend, focusing on order status handling, staff ID formatting, staff management, and chatbot-related functionality. The most notable changes are the addition of a
Pendingorder status, standardized staff ID formatting, enhanced staff lookup and management, and the introduction of a basicChatbotclass for menu-based responses.Order status and workflow improvements:
Pendingstatus toOrder.Status, set as the initial status for new orders, and updated status transition validation to enforce correct order state progression.PendingandPlacedstatuses.Staff ID formatting and management:
getFormattedId()implementations inStaff,Chef, andDelivery, and updatedgetId()to return formatted IDs for display.Restaurantfor improved polymorphic handling.Chatbot and API enhancements:
Chatbotclass that exposes menu items and provides a basic method for generating responses based on the menu.ChatbotintoOpenAiServiceto generate menu-based responses, and improved error handling inOpenAiChatControllerto fall back to simulated replies when the OpenAI API fails.Other improvements:
Rawoption to theCookedTypeenum inMenuItem.Restaurantto record orders and deliveries for statistics tracking.Staff.