Commit Graph
30 Commits
Author SHA1 Message Date
Jepp9350 2151cf2b7b Add customer listing and import functionality for Economic
Implemented endpoints to list and import customers from the Economic API, including query filtering, pagination, and validation. Added supporting trait methods, database functions, and error handling. Expanded the user object for Economic integration and introduced utilities for type checking and parameter extraction.
2025-02-13 12:50:35 +01:00
Jepp9350 7525a89154 Refactor database operations and enhance routes for consistency
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.
2025-02-12 16:39:52 +01:00
Jepp9350 c240bbd94f Refactor database object trait and improve data handling
Added `delete`, `restore`, and other utility methods to enhance CRUD operations, including support for soft deletes. Introduced `objectChanged` hooks across objects for better cache or event handling, ensuring scalability and maintainability. Refactored and standardized object property handling while restructuring related methods.
2025-02-12 09:23:35 +01:00
Jepp9350 555d4e9918 Add comprehensive backup functionality and refactor email handling
Implemented server, database, and environment backups with configurable modules. Introduced new routes and configuration classes for backups alongside improved zip and S3 storage. Replaced PHPMailer with a cURL-based email service for streamlined message sending.
2025-02-11 17:41:57 +01:00
Jepp9350 797630d8bd Add backup and email enhancements with PHPMailer integration
Introduced a backup system managing database and metadata files using Minio/S3, alongside routes for handling these. Integrated PHPMailer for robust email functionalities, including configuration testing and SMTP handling. Updated Dockerfile, composer dependencies, and minor code improvements to support new features.
2025-02-11 14:25:26 +01:00
Jepp9350 61de9cdb45 Add email configuration module and enable invoice PDF retrieval
Introduce an email configuration module to manage SMTP settings, including encryption, host, username, and more. Implement functionality for retrieving invoice PDFs, storing them, and providing secure download links. Added relevant endpoint, routes, and helper methods to support these features.
2025-02-10 18:07:51 +01:00
Jepp9350 172e37d3a2 Add reCAPTCHA support and enhance Economic configurations
Introduce reCAPTCHA integration with validation and configuration handling. Update Economic module to include layout management and dynamic configuration via API. Added traits for managing module settings and encapsulated new endpoint routes for expanded functionality.
2025-02-10 15:27:32 +01:00
Jepp9350 ac657d6130 Add endpoint to close invoice drafts and refactor routes
Introduced a new POST endpoint `/invoices/draft/close` to allow closing of draft invoices, enforcing user authentication and permissions. Refactored and reorganized route and utility methods to improve readability and maintainability, including restoring `match_route` and restructuring `fromRequest`. Removed unused methods for cleaner code.
2025-02-07 13:03:22 +01:00
Jepp9350 f8cd736154 Add new endpoints and support for fetching user keys
Introduced functionality to fetch all user keys with associated data. Implemented new endpoints for deleting user bookings and retrieving user IDs, alongside permission checks and validation. Minor adjustments made for better error handling and improved debug logging behavior.
2025-02-07 10:33:41 +01:00
Jepp9350 588c9d68ef Remove unused '/orders/pending' route from ordersRoute.php
This route was unused and marked with a TODO for removal. Its deletion simplifies the code and eliminates unnecessary maintenance for an unused endpoint.
2025-02-06 14:28:19 +01:00
Jepp9350 ad2075a7d1 Update order and invoice handling logic
Added functionality to retrieve and list pending orders, as well as improved invoice draft management based on customer preferences (e.g., invoice per order). Simplified error handling and removed redundant operations in economic invoice logic.
2025-02-06 14:27:09 +01:00
Jepp9350 f2dcb6e5ba Add draft invoice handling and enhance endpoint functionality
Introduced endpoints and routes for managing draft invoices, enabling retrieval and updates. Extended object handling to include filters for deleted entries and added custom parsing for pagination results. Refactored code for improved structure and consistency.
2025-02-06 11:57:42 +01:00
Jepp9350 7186b27b74 Improve invoice fetching and add vehicle plate lookup API
Refactored the invoice retrieval to handle pagination for both drafts and booked invoices, ensuring all results are fetched when exceeding the limit. Added a new route for vehicle plate lookup, allowing retrieval of order history for a specified vehicle plate. Implemented the corresponding database query method in `orders_o`.
2025-02-05 16:18:52 +01:00
Jepp9350 6404ba65b2 Enhance invoice line formatting and content handling.
Standardize line formatting by prefixing notes and references with '#'. Refactor handling of registration numbers and discounts for improved clarity. Ensure empty lines are added for better visual separation in invoices.
2025-02-05 13:56:47 +01:00
Jepp9350 d022982b77 Add functionality for handling draft invoices in statistics
Introduced new endpoints and methods to incorporate draft invoice data into economic statistics. This includes calculating totals across various timeframes and aggregations by departments. Updated routes and traits to support these additions, ensuring seamless integration with the existing economic module.
2025-02-04 16:53:41 +01:00
Jepp9350 c82c201ff1 Add support for handling booked invoices and department stats
Introduced functionality for fetching and processing booked invoices with department-specific statistics. Added pagination and filtering capabilities for economic endpoints, including department data handling. Updated nginx configuration to support additional HTTP methods (PUT, DELETE).
2025-02-04 11:46:35 +01:00
Jepp9350 6ebea5504e Add endpoints and routes for economic statistics management
Implemented economic-related classes, endpoints, and routes to support fetching invoice totals, sent invoices, and department data. These changes enhance functionality by exposing APIs for economic statistics and integrating them into the statistics module.
2025-02-04 08:36:05 +01:00
Jepp9350 0960f35007 Add force_all parameter to getDepartmentById method
This update enhances the `getDepartmentById` method by adding an optional `force_all` parameter to bypass caching and fetch data directly from the database. Adjusted related calls in `orders_o` to use this new parameter where needed. This ensures greater control over data retrieval behavior.
2025-02-03 13:57:42 +01:00
Jepp9350 1e8c60e33a Refactor booking status handling and enhance file checks.
Updated booking logic to include completed bookings in cancellation handling. Added `isFileInStore` to improve file existence checks in the wash certificate store. Adjusted file server logic to use the new method for enhanced clarity and maintenance.
2025-02-03 09:34:09 +01:00
Jepp9350 bcbb4c0164 Add order statistics functionality
Introduced functionality to calculate and retrieve order statistics, including monthly counts per department. Updated statistics interface, routes, and supporting logic to handle new "orders" data type alongside bookings. Refactored code to streamline label generation by year and month ranges.
2025-01-31 16:17:34 +01:00
Jepp9350 e09eedb010 Add statistics feature with bookings tracking functionality
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.
2025-01-31 12:32:22 +01:00
Jepp9350 ca52d3b248 Update API endpoints, add wash certificate handling
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.
2025-01-31 09:25:18 +01:00
Jepp9350 13fb3a10ae Simplify department name retrieval logic in Redis class
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.
2025-01-30 16:59:33 +01:00
Jepp9350 2663c09455 Improve plate scanner handling and add pagination support
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.
2025-01-30 16:17:06 +01:00
Jepp9350 2e61eaa414 Add support for customizable searchable fields in queries
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.
2025-01-30 15:29:21 +01:00
Jepp9350 562788e9ff Update backup service to use periodic execution with curl
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.
2025-01-29 17:20:39 +01:00
Jepp9350 d5e3991bf8 Add initial backup service with Docker and scripts
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`.
2025-01-29 16:51:19 +01:00
Jepp9350 3f9e6310f4 Remove unnecessary app directory copy in Nginx Dockerfile
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.
2025-01-29 15:29:32 +01:00
Jepp9350 b97881ff05 Update database table references and clean up whitespace
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.
2025-01-29 15:14:17 +01:00
Jepp9350 707df910b0 Refactor: migrate files 2025-01-29 14:27:44 +01:00