Commit Graph
580 Commits
Author SHA1 Message Date
Jeppe Bundgaard 49589de98e Update getUserByCustomerNumber references to getCustomerByIdOrCustomerNumber and enhance null-checking in requireSelected. 2026-01-06 15:40:05 +01:00
Jeppe Bundgaard 19c13977ca Ensure administration fee exemption for users with the relevant attribute and enhance null-checking in requireSelected. 2026-01-06 15:02:46 +01:00
Jeppe Bundgaard 71261c3933 Add administration fee handling to invoice collections, ensuring fees are applied monthly or per order if unpaid. 2026-01-06 14:52:25 +01:00
Jeppe Bundgaard 6bd8986043 Add fee product ID configuration to the Economic module 2026-01-06 13:19:11 +01:00
Jeppe Bundgaard f9e8fb9b96 Add admin fee configurations for monthly and order-based billing in the Economic module 2026-01-06 13:07:06 +01:00
Jeppe Bundgaard 30abc6c593 Set lane ID on order initialization in selfserve_lane_invoice_t. 2026-01-06 12:02:04 +01:00
Jeppe Bundgaard 3bca46c457 Enhance decodeData method to better handle double-escaped JSON by adding additional decoding attempts. 2026-01-06 11:51:48 +01:00
Jeppe Bundgaard d244294dd9 Improve decodeData method to handle HTML-encoded JSON and ensure it returns an array. 2026-01-06 11:48:51 +01:00
Jeppe Bundgaard dd77eda929 Expand openapi.yaml with endpoint and schema definitions for listing module action logs, including pagination, filtering, and associated parameters. 2026-01-06 11:15:59 +01:00
Jeppe Bundgaard 9c3a3e6149 Add route and tests for listing module action logs with pagination and filtering 2026-01-06 11:11:40 +01:00
Jeppe Bundgaard c197276a6e Integrate lane action logging mechanism across controllers, commands, and status management. 2026-01-06 11:08:57 +01:00
Jeppe Bundgaard 0b08d8dbe6 Add selfserve_lane_log_action enum for lane action definitions and outline logging mechanism. 2026-01-06 11:04:50 +01:00
Jeppe Bundgaard 14aaf68d69 Skip transactions with automatic department ID during invoicing processing. 2026-01-06 10:56:39 +01:00
Jeppe Bundgaard b2c6273e72 Add lane status to asArray and implement detailed department lane retrieval 2026-01-06 10:56:29 +01:00
Jeppe Bundgaard dd57c945e6 Imported XLVask v1.yaml from https://api.xlwash.com/scalar/ 2026-01-06 09:17:59 +01:00
Jeppe B d39bf2dbd6 Merge pull request #94 from copenhagentruckwash/copilot/add-openapi-documentation
Add OpenAPI 3.0.3 specification for all API routes and schemas
2026-01-05 13:16:38 +01:00
Jeppe Bundgaard ed53d16d6c Expand openapi.yaml with endpoints for superuser authentication, invoicing distributions, backup module management, and button press recording. 2026-01-05 13:14:37 +01:00
Jeppe Bundgaard f91b855545 Expand openapi.yaml with endpoints for order bookings, department daily reports, and related management operations. 2026-01-05 13:08:58 +01:00
Jeppe Bundgaard c58e385cfd Expand openapi.yaml with endpoints for notifications, Stripe payment processing, e-conomic integration, and Stripe terminal management. 2026-01-05 12:34:33 +01:00
Jeppe Bundgaard 7705fc8a09 Expand openapi.yaml with endpoints for orders, vehicles, departments, and economic statistics. 2026-01-05 12:12:00 +01:00
Jeppe Bundgaard c8b83c63d3 Expand openapi.yaml with endpoints for branding, roles, permissions, department management, and module operations. 2026-01-05 12:04:31 +01:00
Jeppe Bundgaard 5c0092125e Expand openapi.yaml with endpoints for role management, user permissions, customer data, and superuser operations 2026-01-05 12:03:45 +01:00
Jeppe Bundgaard 568ad065d9 Expand openapi.yaml with branding options management 2026-01-05 12:02:26 +01:00
Jeppe Bundgaard 756a8eca1a Expand openapi.yaml with new endpoints for department lanes, worker operations, license plate scanning, invoicing, and configuration management. 2026-01-05 11:50:36 +01:00
copilot-swe-agent[bot]andjepp9350 7f6ab7ec18 Add comprehensive openapi.yaml documentation for all API routes and schemas
Co-authored-by: jepp9350 <17977216+jepp9350@users.noreply.github.com>
2026-01-05 10:34:48 +00:00
copilot-swe-agent[bot] 3b90f874a2 Initial plan 2026-01-05 10:28:59 +00:00
Jeppe B 62fbbdf38e Merge pull request #92 from copenhagentruckwash/updater-v1
updater-v1
2026-01-05 09:22:40 +01:00
Jeppe Bundgaard 54c16b06e7 Send wash certificate email to the customer if a booking is associated 2026-01-02 11:18:10 +01:00
Jeppe Bundgaard bcca9dd319 Add getOrderBooking method to fetch linked booking object for orders 2026-01-02 11:18:06 +01:00
Jeppe Bundgaard e5c728f703 Cast department ID to integer and license plate to string in self-serve lane invoice creation 2025-12-18 11:09:58 +01:00
Jeppe Bundgaard 3115856fc8 Remove redundant return statement in Shelly relay control logic 2025-12-16 11:41:00 +01:00
Jeppe Bundgaard 3eef3b45c4 Add customer number validation and bypass mechanism for self-serve lane operations
- Introduced customer number validation during STOP command to ensure the lane's customer matches the provided customer number.
- Added a flag and methods to bypass customer number validation when authorized.
- Updated routes to set the bypass flag for users with appropriate permissions.
- Included customer number in command arguments for enhanced validation.
2025-12-16 11:40:41 +01:00
Jeppe Bundgaard b6371455ca Enforce command-specific permissions for self-serve lane operations and update related tests 2025-12-15 16:00:00 +01:00
Jeppe Bundgaard 46c7a2f2cd Add http-client.env.json for HTTP client test environment configuration 2025-12-15 10:34:48 +01:00
Jeppe Bundgaard fff5637fe6 Refactor self-serve.http tests to use dynamic variables for API URL, customer number, license plate, and lane ID 2025-12-15 10:34:42 +01:00
Jeppe Bundgaard 4e1404f070 Add invoices-pdf.http test for invoice PDF endpoint validation 2025-12-15 10:33:14 +01:00
Jeppe Bundgaard d0bd305b0b Add orders-potential-duplicates.http test for endpoint validation 2025-12-15 10:32:16 +01:00
Jeppe Bundgaard 761096495a Update numberplatescans.http to use dynamic variables for API URL, plate, bay ID, and authorization token 2025-12-15 10:30:59 +01:00
Jeppe Bundgaard 06e0f58ce2 Fix mismatched array brackets in plateScansRoute response structure 2025-12-15 10:25:47 +01:00
Jeppe Bundgaard 5a71889b26 Add support for optional bayId in license plate scans
- Updated `plateScansRoute` to handle an optional `bay_id` parameter in plate scan requests.
- Extended `plate_scans_o` object to include `bay_id` property and related database operations.
- Enhanced `add` method to validate and process `bayId` if provided.
2025-12-15 10:14:00 +01:00
Jeppe Bundgaard 9c9df0f1f4 Validate access and booking status for retrieving invoice PDFs
- Added validation to ensure the user owns the invoice and it has been booked before generating the PDF.
- Updated logic to retrieve and store booked invoice PDFs using the correct `booked_invoice_id`.
- Improved error handling for unauthorized access and unbooked invoices.
2025-12-10 14:22:37 +01:00
Jeppe Bundgaard f8af8cae46 Add lane management extensions to department functionality
- Introduced `getLanes` method in `departments_o` to retrieve associated lanes.
- Extended `department_lanes_o` with `getLaneStatus` and `getDepartmentLanes` methods for lane data handling.
- Updated guest route to support `include_lanes` parameter, enabling retrieval of lanes and their statuses for departments.
- Enhanced response structure with lane information when requested.
2025-12-09 14:38:59 +01:00
Jeppe Bundgaard 3cbce2a68f Add detailed customer booking notifications with message formatting
- Enhanced booking notifications to include comprehensive customer and booking details.
- Implemented message formatting for clarity: customer info, date, vehicle(s), items, references, PO, and pickup status.
- Improved notification structure by integrating branding name into messages.
2025-12-09 10:58:34 +01:00
Jeppe Bundgaard 68e93fdd9d Add relay_machine_id property to department_lanes_o object and extend related functionality
- Introduced `relay_machine_id` to `department_lanes_o` for managing Shelly relay associated with machines.
- Updated `add` method and database interactions to support the new property.
- Included `relay_machine_id` in `asArray` and field initialization logic.
- Enhanced `departmentLanesRoute` to handle `relay_machine_id` via API for creation and updates.
2025-12-09 10:26:32 +01:00
Jeppe Bundgaard 1b914b546e Add minute-based billing and lane management extensions to self-serve module
- Introduced `selfserve_lane_command_arguments` class for managing lane command parameters (e.g., customer number, license plate).
- Added traits for handling lane timer, invoice generation, license plate, and customer number management.
- Implemented minute-based billing logic with `selfserve_minute_product_c` configuration.
- Enhanced `selfserve_lane` with new behaviors: command arguments, invoicing, and time handling.
- Added `/modules/self-serve/lane/command` route for executing lane commands (START, STOP, RESET).
- Updated `/modules/self-serve/lane/status` route to include additional lane details (wash start, elapsed time, license plate, etc.).
- Improved Shelly device relay control for port management.
2025-12-08 23:05:35 +01:00
Jeppe Bundgaard cc6639e61b Introduce self-serve module with lane management functionality
- Added `selfserve_lane` class to handle self-serve lane operations.
- Implemented commands (START, STOP, RESET) and states (IDLE, IN_WASH, FAULT, etc.) for lane lifecycle.
- Introduced traits for managing lane status, mode, state, caching, and port control.
- Added enums for cohesive type definitions (`selfserve_lane_command`, `selfserve_lane_status`, `selfserve_lane_state`, etc.).
- Configured `/modules/self-serve/lane/status` route to expose lane state and status via API.
- Linked self-serve configuration via `selfserve_c` and `selfserve_enabled_c` for module toggling.
- Integrated lane caching logic with Redis for performance improvements.
- Updated `index.php` to include the self-serve module.
2025-12-08 15:34:40 +01:00
Jeppe Bundgaard d3d3657dfd Generate and attach wash certificate to orders
- Added `generateWashCertificate` method to `orders_o` for wash certificate PDF generation and attachment.
- Introduced `OTHER_TYPE_WASH_CERTIFICATE` constant in `attachment_content` for new attachment type.
- Added `/order/wash-certificate` route to provide wash certificate generation functionality via API.
2025-12-03 08:45:13 +01:00
Jeppe Bundgaard 3c46ee86ec Add routes for worker version management
- Introduced `/worker/version` route to retrieve current worker target version.
- Added `/worker/update-version` route to update worker target version with permission and parameter validation.
2025-12-01 15:01:25 +01:00
Jeppe Bundgaard b45e270fed Skip transactions not included in invoicing
- Updated `customer_vehicles_o` to exclude transactions not marked for invoicing during processing.
2025-12-01 13:20:07 +01:00
Jeppe Bundgaard d2f82b83ed Validate subscription price distribution and skip excluded transactions in invoicing
- Enforce validation to ensure department distribution matches total subscription price.
- Skip transactions not included in invoicing for improved accuracy.
- Uncomment permission checks in specific routes.
2025-12-01 13:19:59 +01:00