- Introduced a new 'bannedUntil' datetime field in the customer schema to track when a customer is banned until.
- Updated TypeScript definitions to include the new 'bannedUntil' attribute, ensuring type safety and consistency across the application.
- Updated the Telegram notification message to display the total cost of services associated with an order, improving transparency for clients and masters.
- Added logic to calculate the total price based on individual service prices and formatted the price for better readability.
- Introduced new fields 'price' and 'description' in the service schema to enhance service details.
- Updated TypeScript definitions to include these new attributes, ensuring type safety and consistency across the application.
- Modified the notification message format to include a list of all services associated with an order instead of just the first service. This change enhances clarity for both clients and masters by providing comprehensive service details in notifications.
- Changed the Docker image reference in docker-compose.yml to use dynamic environment variables for better flexibility.
- Updated the GitHub Actions workflow to set the image tag based on the commit SHA, ensuring unique tagging for each build.
- Added environment variable definitions for Docker Hub credentials and image tag in the deployment process.
* refactor: consolidate order lifecycle validation logic and remove slot lifecycle
- Streamlined the order lifecycle by consolidating validation logic and removing redundant error handling.
- Deleted the slot lifecycle file to simplify the codebase, as its functionality is no longer needed.
- This change enhances maintainability and reduces complexity in the order management system.
* feat: enhance Telegram notification heading for order updates
- Updated the heading emoji logic to display a checkered flag for completed orders and a pencil for updates, improving clarity in notifications.
- Added specific handling for completed records in the notification heading to differentiate between updated and completed statuses.
- Implemented a check in both order and slot lifecycles to skip validation if the record is being updated, identified by the presence of the 'publishedAt' field. This change prevents unnecessary validation for existing records.
- Temporarily disabled the beforeDelete method to prevent slot deletion checks related to existing orders. This change is intended for further review and potential reimplementation.
- Introduced a new error message for attempts to create orders with a start time in the past.
- Implemented a check in the order lifecycle to validate that the order start time is not before the current time.
- Added maxLength constraints to 'name' and 'phone' attributes in customer and service schemas.
- Marked 'name' as required in both schemas.
- Updated TypeScript definitions to reflect these changes.
- Added Telegraf dependency to handle Telegram bot interactions.
- Updated order lifecycle methods to send notifications upon order creation and updates.
- Refactored datetime handling to use a consistent timezone.
- Removed unused utility functions to streamline codebase.
* feat: refactor order and slot lifecycles to use datetime fields for time validation
* refactor: remove time fields from order and slot schemas to streamline data structure
* fix: correct time validation logic in order and slot lifecycles to ensure proper datetime comparisons
* fix: update order lifecycle validation to exclude only 'cancelled' state
* fix: add validation to ensure order times fall within the specified slot boundaries
* feat: integrate dayjs for improved datetime handling in order lifecycles
Нельзя завершить запись до её наступления
* fix: enhance datetime validation in order and slot lifecycles to ensure accurate comparisons
* fix: standardize error messages in order and slot lifecycles for better clarity