- Added methods in `department_categories_o`, `departments_o`, and `categories_o` to retrieve products associated with department categories.
- Updated `productsRoute` and `superuserDepartmentRoute` to fetch department-specific products.
- Fixed typecasting in product price assignments for improved data consistency.
- Adjusted `productsRoute` to include products from categories "1" and "3" when category "6" is requested.
- Merged additional products to ensure comprehensive category listings.
- Added exception handling with logging when fetching customer by ID fails.
- Improved safety checks to ensure customer existence before returning the object.
- Return `null` in case of failure to prevent unhandled errors.
- Added `virtual_cart` property in `bookings_o` and enhanced its structure method.
- Introduced `display_in_booking_form` and `order_priority` properties in `products_o` with updates to object structure, parsing, and routes.
- Enabled handling of product attributes `display_in_booking_form` and `order_priority` in `productsRoute`.
- Added `booked_invoice_id` reset logic in `collected_order_invoices_o`.
- Introduced `machineButtonPressRoute` to log button press incidents and send Slack notifications.
- Introduced methods to apply customer-specific discounts and department-based pricing to products and addons.
- Enhanced `productsRoute` to handle optional parameters (`customer_id`, `department_id`, `category`, `id`) for tailored pricing and filtering.
- Updated response generation to include adjusted prices for both products and options based on customer and department context.
- Added helper methods to streamline parameter validation and parsing in `productsRoute`.
- Extended `products_o` to support discount application logic for customer pricing.
- Introduced `is_wash` field to `products_o` for marking wash-related products.
- Updated `productsRoute` to handle `is_wash` in product creation and editing.
- Added `getTransactionsOnDateWashesCount` method in `department_daily_reports_o` for calculating wash-related transactions in reports.
- Adjusted department daily reports routes to include wash statistics output.
Introduced functionality for handling Stripe payment intents, including creation, retrieval, and cancellation. Added a subscription_allowed flag to products for enabling subscription-specific operations. Integrated the necessary backend endpoints, object property updates, and route handling logic.
Updated user price overrides and product attributes to enforce consistent data types. This improves data handling clarity and reduces type-related errors across the application.
Introduced a new 'requires_note' property to the product object, including its initialization, serialization, and integration in relevant routes. This change ensures the property can be set, retrieved, and properly processed in API requests. It also updates logging to capture changes to this field when editing products.
Introduced functionality for managing department daily reports, including endpoints for creating, updating, listing, and viewing product sales data. Enhanced product handling in reports by adding support for water usage, notes, and detailed product sales metrics. These changes improve tracking and reporting accuracy across departments.
Introduce the booked_invoice_id property in collected_order_invoices_o for improved invoice management. Optimize performance by avoiding redundant requests to external systems when the booked_invoice_id is already set. Enhance routes to include the booked_invoice_id in relevant responses and ensure a consistent structure for associated data.
This update introduces explicit permission definitions for various route handlers across multiple routes. These changes enhance clarity and allow for more granular control over route access based on defined permissions. The updates ensure better manageability and scalability of endpoint permissions.
Introduce endpoints for managing product options and department categories, including listing, creating, editing, and deleting functionalities. Updated related objects and traits to support new operations, including added array serialization methods and improved query handling for better flexibility.
Refactored database methods to improve code readability, reusability, and error handling. Introduced input validation helper functions and parsing capabilities for objects with optional callbacks. Added new routes for handling categories and improved product-related functionality to align with the new architecture.