Introduce a scalable statistics architecture including `statistics` class, interface, and related implementations. Added support for tracking new bookings with routes and data handling through `bookings_s` and `statistic_t`. Integrated the feature into the application using autoloaders and response mechanisms.
Replaced legacy 'nnks.truckwash.dk' endpoint with 'api.truckwash.dk' across the codebase for consistency. Implemented a feature to handle certificate downloads, including file serving and validation. Updated PHP configuration to support additional dependencies like PHPMailer, and introduced necessary route and configuration changes for wash certificate processing.
Replaced JSON decoding with direct object casting for department data, reducing unnecessary parsing overhead. This change ensures a more efficient and straightforward handling of the `get_department_name` function.
Refactored listObjects to include searchable fields and support for pagination. Enhanced validation logic for clearer error handling of required fields. Removed unused import to clean up the codebase.
Introduced a `setSearchableFields` method to restrict searchable fields in database queries, enhancing security by preventing unintended access to sensitive data. Updated user and department routes to leverage this feature. Default behavior remains unchanged when no searchable fields are specified.
The Dockerfile now uses a loop to run the backup script every 60 seconds. Added `curl` installation and a curl command in `backup.sh` for external script execution. Removed unused echo statements for clarity.
This commit introduces a Dockerized backup service, including a Dockerfile, a placeholder `backup.sh` script, and a functional `database_export.sh` script for creating database backups. The setup ensures required validations and dependencies for safely exporting database content. Further implementation is needed in `backup.sh`.
The COPY command for transferring /app to /var/www/html was commented out as it is redundant. Nginx is not being used to serve static files in this setup with separate PHP and Nginx containers. This helps avoid unnecessary actions and aligns the configuration with the intended architecture.
Replaced all references to `maintenancemode_dbtest.customer_attributes` with `customer_attributes` in `users_o.php` for clarity and consistency. Additionally, removed unnecessary empty line in `redis_t.php` to improve code formatting.
Introduce functionality to synchronize bookings, including creating or updating bookings based on provided details. Added strong typing to the `addOrUpdate` method for improved robustness and code clarity.
The logic for syncing bookings, including data extraction and updates, was removed as it is no longer needed. This improves code readability and reduces unnecessary complexity in the route handling. The success response logic remains intact.
Added hostname and version information to the worker status response. Refactored environment variable handling for better readability and modularity. Updated .dockerignore to exclude `docker-compose.yml`.
This update ensures that the docker-compose.yml file is excluded from version control. It prevents accidental commits of local development configurations.
Introduce Docker support with a Dockerfile and example docker-compose setup, enlisting services like MySQL and Redis. Enhance economic invoice drafts with support for dimensions while restructuring related logic and schemas for better maintenance and clarity.
Refactored `pickup_bool` parsing to ensure consistent boolean handling across the application. Replaced mixed type checks with explicit boolean conversion and updated relevant logic to improve data reliability. This change avoids potential errors caused by inconsistent input formats.
Updated the `get` method to return a detailed object with collection and pagination details, improving data structure consistency. Adjusted endpoint request to target `/orders/drafts` for the appropriate data. Minor test and dependency additions ensure proper functionality and integration.
Introduce new classes, interfaces, and traits for integrating Economic API, including handling orders and drafts. Add CLI commands, test scripts, and database updates for enhanced functionality. Implement endpoint to complete a wash without a wash certificate.
Introduced cron tasks for syncing user economic customer details and discounts. Enhanced caching mechanisms for users and departments, added Slack messaging capabilities, and updated CLI/script routing for better flexibility. New routes and utility methods improve cron execution and logging.
Replaced direct user object usage with Redis caching for customer information, optimizing retrieval logic and adding support for caching user IDs by customer number. Updated methods to allow dynamic object ID handling in caching operations and improved cache key consistency. These changes enhance performance and maintainability.
Introduced a more dynamic and modular cron task system for better task management. Reworked user-related caching to use a consistent structure, replacing economic-specific functions with general-purpose methods. Improved customer and booking synchronization processes to streamline operations.
Updated return types from `language_pack_i` to `object` for flexibility. Enhanced `parseUsers` to convert empty passwords into booleans for better data representation. Added a new endpoint to list number plate scans with proper logging and session validation.
Introduced a new PUT /order route allowing authenticated users to update orders. Added `updateRequest` method in `orders_o` to process update requests, handle validations, and apply changes. Ensured proper error handling for missing or invalid inputs.
Ensure token consistency by clearing it from the cache after deletion from the database. This prevents potential issues with stale data in the caching layer.
Introduced language pack functionality with default and user-specific translation handling. Enhanced token caching in Redis for improved performance. Refactored logging system to display progress during database synchronization.
Previously, the customer discount cache lacked an expiry time, which could lead to stale data. This change ensures the cached value expires after 60 seconds, improving cache reliability.
Introduced a new global variable, WORDPRESS_API_URL, for defining the WordPress API ajax endpoint. This change ensures better configuration clarity and simplifies setup for WordPress integration.
Updated logging to use prepared statements, improving security and performance. Refactored Redis-related functions for flexibility, added timing for sync operation, and ensured proper cache cleanup after log synchronization. Simplified `clear_keys` and enhanced code readability throughout.
Improved booking handling with unfulfilled booking checks and Slack notifications. Enhanced customer data retrieval with caching optimizations and discount calculations. Added logging, debug capabilities, and expanded Redis functionalities for better data management.
Implemented methods for booking synchronization, including fetching, parsing, and updating bookings from a remote API. Added caching mechanisms and data validation for customer names, department names, and booking details. Integrated new API trait and remote booking class to improve scalability and enable automated tests for booking modules.
Implemented caching for department and customer names to improve performance. Added Slack notifications for new bookings with detailed formatting. Refactored related methods to streamline functionality and ensure better code clarity.
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.