Implemented Redis caching for improved department and customer data retrieval. Added Slack integration to send department notifications. Enhanced booking features and status handling, including parsing logic and wash certificate processing.
Introduces Redis integration with a client class, traits, and interface for caching and object persistence. Adds Redis tests, updates `composer` to include Predis, and extends configurations to support Redis. Implements a new `delete` method for bookings and enhances pagination to include order details.
Introduced functionality to handle `justDownload` parameter, allowing direct retrieval of certificate download URLs for a given booking ID. Updated comments and made minor adjustments to file cleanup logic by disabling certificate deletion.
Simplified wash certificate storage logic by updating methods for file existence checks and download link generation. Added validation to ensure users can only access their own wash certificates. Introduced a route for downloading wash certificates with proper permissions and error handling.
Introduced Minio support to store and manage wash certificates, replacing local file storage. This includes implementing traits, interfaces, and a Minio client integration, along with a CLI utility and relevant tests. Updated relevant modules and configurations.
This commit introduces the `composer.lock` file to ensure consistent dependency versions across environments. It captures the precise versions of installed packages, enhancing reproducibility and minimizing potential conflicts during deployments.
Replaced redundant SQL queries with reusable methods for paginating, filtering, and searching records. Improved query safety using prepared statements and enhanced flexibility with dynamic order and filter processing. Updated related routes and objects to support the new structure.
Refine db_object_t filtering to handle numeric vs. string values. Add a new token for wash certificate authentication and update routes to include it in responses when applicable. Adjust data type for pickup_bool in bookingsRoute handling.
This commit introduces the Wash Certificate generator, including template files, images, fonts, and outputs necessary for certificate generation. These assets and configurations support creating customized wash certificates effectively.
Introduced a new public route to fetch public employee data based on specific permissions. Added helper methods in `users_o` for fetching users in a group, listing public employee data, and getting users with specific permissions. Adjusted formatting for better readability in existing checks.
Introduced a new method to fetch unfulfilled bookings count by department in `bookings_o`. Added a corresponding route in `bookingsRoute` to expose this functionality via an API endpoint. Validations and logging were also implemented to ensure proper usage and tracking.
Updated the log message in plate scans flow to include a clearer format by adding a colon before the plate data. Also removed an unused import for better code cleanliness.
Reorganized class properties for better accessibility and added a `nullify` method for handling null values in the database. Enhanced customer handling logic to prevent duplicate records and ensure password nullification. Improved password validation and user authentication checks for stricter input handling.
Added numeric validation for `order_id` and `customer_number` in API routes to prevent invalid input. Implemented department-based pricing adjustments for order items across relevant endpoints, enhancing pricing accuracy based on department configurations.
Replaced direct SQL fetching with object methods to retrieve product prices based on department. Added `getDepartmentPrice` method in `products_o` for cleaner and more reusable code. This enhances maintainability and aligns with object-oriented principles.
Replaced `create_token` with `create_employee_token` to align with the use of `user_id` instead of `customer_number`. Removed unused `tokens_o` import to clean up dependencies.
Introduce functionality to set, fetch, and apply department-specific product prices. Enhanced the API with routes for superusers to manage department pricing, including endpoints to set prices, fetch prices, and retrieve department details.
Introduced a new endpoint for employee login in `authRoute.php`, including validation, credential checks, and token generation. Enhanced the `authentication` class to support employee authentication and token creation, ensuring secure handling of employee credentials. Additionally, improved customer authentication logic and refactored password matching for reuse.
Added support for products to inherit discounts from categories if configured. Updated relevant methods, classes, and routes to handle conditional application of category discounts and improved logic for managing price overrides.
Introduced API endpoints to set and retrieve user-specific discounts. Integrated discount logic into orders, with adjustments based on category or product. Added a new object `user_price_overrides_o` for handling price overrides along with relevant updates to existing classes.
Added logic to handle open invoice drafts for customers, allowing draft reuse or creation as needed. Enhanced user order-fetching with permission checks and validation. Refactored related methods for better code structure and consistency.
Refactored `getUserAttributes` and moved it within `users_o` class for a cleaner structure. Introduced proper assignment of attributes to the `attributes` array in the class. Enhanced API response to conditionally include user attributes based on request parameters.
Introduced a new route to fetch the last five orders for a vehicle using its plate. Implemented a corresponding method in the `orders_o` class to query order history based on vehicle plates, supporting dynamic entry limits. This enhances functionality for tracking vehicle-associated orders.
Introduced three new methods: `restrictSpotFree`, `restrictInteriorCleaning`, and `restrictTankCleaning`. These methods check if a customer is restricted from purchasing certain services based on their attributes. This enhances control over customer purchase eligibility.