Skip to content

Conversation

@dahw
Copy link
Contributor

@dahw dahw commented Oct 27, 2025

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 Pending order status, standardized staff ID formatting, enhanced staff lookup and management, and the introduction of a basic Chatbot class for menu-based responses.

Order status and workflow improvements:

  • Added a Pending status to Order.Status, set as the initial status for new orders, and updated status transition validation to enforce correct order state progression.
  • Updated chef order cancellation and pending order retrieval logic to handle both Pending and Placed statuses.

Staff ID formatting and management:

  • Standardized staff ID formatting with new getFormattedId() implementations in Staff, Chef, and Delivery, and updated getId() to return formatted IDs for display.
  • Refactored staff lookup and validation to use raw IDs for internal operations and formatted IDs for display, and introduced a general staff list in Restaurant for improved polymorphic handling.

Chatbot and API enhancements:

  • Added a new Chatbot class that exposes menu items and provides a basic method for generating responses based on the menu.
  • Integrated Chatbot into OpenAiService to generate menu-based responses, and improved error handling in OpenAiChatController to fall back to simulated replies when the OpenAI API fails.

Other improvements:

  • Added a new Raw option to the CookedType enum in MenuItem.
  • Added methods in Restaurant to record orders and deliveries for statistics tracking.
  • Added missing getters for staff properties in Staff.

dahw and others added 9 commits October 26, 2025 16:19
… key and failures; update Menu component to support search by toppings
…nagement App

- Implement tests for MenuItemEntity, MenuItemIngredientEntity, OrderEntity, OrderItemCustomizationEntity, OrderItemEntity, OrderQueueEntity, and StaffEntity to validate getters and setters.
- Create tests for ChatbotService, KitchenService, MenuService, RecipeService, RestaurantService, and UserService to ensure functionality and coverage.
- Add coverage tests for order processing, user registration, and authentication methods.
- Ensure proper handling of edge cases and null values in service methods.
@vercel
Copy link

vercel bot commented Oct 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cs-25-2-team2 Ready Ready Preview Comment Oct 27, 2025 8:52pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants