Commit Graph
339 Commits
Author SHA1 Message Date
Jeppe Bundgaard ebf7e820d5 Add safety seal support to orders and related logic for wash certificates
- Introduced `safety_seal` column in the `orders` table.
- Updated order creation and completion logic to handle safety seal values.
- Enhanced order and booking classes to manage safety seal attachment and retrieval.
- Added tests to validate safety seal functionality in order processing.
2026-04-14 10:51:25 +02:00
Jeppe Bundgaard dc79352f40 Add unit tests for vehicle search metadata alignment and extend API fixtures for vehicle and order item creation. Refactor booking and route handling logic for booked vehicle searches. 2026-04-13 21:42:37 +02:00
Jeppe Bundgaard a83b850aba Remove edge_broker_client.php and related unit tests. Add new dependencies and configuration files for edge-agent, including build scripts and package-lock updates. 2026-04-13 09:42:35 +02:00
Jeppe Bundgaard 745e68aa4f Add wash_date and category fields to complaints, update schema and OpenAPI spec, and extend unit and integration tests for validation and route handling. 2026-04-09 14:16:35 +02:00
Jeppe Bundgaard 22f856c62a Add unit tests for invoicing, orders normalization, gateway commands, and department complaints. Update schema bootstraps and improve agent command execution logic. 2026-04-09 12:24:22 +02:00
Jeppe Bundgaard 9e9372db05 Add unit tests for Bird department gate phone call logic, Edge Broker configuration, and gateway heartbeat status. Refactor warnings handling, Slack notifications, Bird client usage, and Edge gateway probes for improved maintainability and error clarity. 2026-04-09 08:53:10 +02:00
Jeppe Bundgaard 45b7250480 Add Edge Agent implementation for gateway connection lifecycle, agent commands, Shelly device discovery, relay control, and WebSocket communication with broker. Include unit tests for critical flows. 2026-04-08 19:01:42 +02:00
Jeppe Bundgaard 653680376a Add unit and integration tests for collected invoice queue handling, route hardening, lifecycle validation, and manual batch processing logic. 2026-04-08 15:53:22 +02:00
Jeppe Bundgaard ba23ad6e8f Add economic_transfer_executor and economic_transfer_queue classes for handling e-conomic invoice transfer logic, queue management, and processing. Include unit tests for Redis cache validation. 2026-04-08 11:20:08 +02:00
Jeppe Bundgaard 551161b692 Add unit tests for Bird webhook lifecycle, economic customer handling, and payment terms routes with improved error scenarios and response validation. Refactor configuration to support economic API fallback tokens. 2026-04-01 17:44:25 +02:00
Jeppe Bundgaard 0dc1581eb4 Add unit tests for self-serve invoice billing logic, refactor minute-based billing calculations, and improve error handling for billable minutes adjustments. 2026-03-26 21:09:21 +01:00
Jeppe Bundgaard b7fa5540e5 Update Bird class call logic: adjust polling interval and replace flash call creation with voice call creation 2026-03-26 15:29:18 +01:00
Jeppe Bundgaard fcf9924adc Add bird_flash_calls_client implementation with endpoint builder, request schemas, and validator for managing flash call functionality. 2026-03-26 15:18:55 +01:00
Jeppe Bundgaard a292c8a277 Enhance Bird class with flash call fallback logic, caller ID validation, and unit test coverage. Update gate call handling to prefer flash calls with fallback to regular calls. 2026-03-26 13:51:41 +01:00
Jeppe Bundgaard 6208f0ee1c Add flash call functionality to Bird class with support for gate flash call handling and unit tests. 2026-03-26 13:40:26 +01:00
Jeppe Bundgaard 95063d2a70 Add Bird gate call flow unit tests, self-serve machine wash minutes config, relay sync improvements, and OpenAPI updates. Refactor Bird call handling with terminal status detection and timeout normalization. 2026-03-26 13:16:18 +01:00
Jeppe Bundgaard a4654398d0 Add dynamic_images_vehicle_type column to legacy self-serve schemas, update wash flow logic, and add unit tests for schema compatibility. 2026-03-26 11:58:12 +01:00
Jeppe Bundgaard f148b39a85 Add unit tests for legacy schema compatibility, property gate commands, lane state transitions, and relay synchronization. Extend relay logic with demo relay handling, dynamic image updates, phone normalization, and machine relay hard set methods. 2026-03-26 11:11:34 +01:00
Jeppe Bundgaard 76729f1b99 Add department self-serve config versioning routes with lifecycle actions (list, validate, publish, rollback) and associated logic for managing config versions. 2026-03-25 17:54:41 +01:00
Jeppe Bundgaard 7fc70184df Add unit tests and routes for department weather targets, including GET/PUT endpoints, thresholds validation, and aggregate status handling. Extend OpenAPI spec with schema mappings for department weather targets and machine relay endpoints. 2026-03-25 11:14:25 +01:00
Jeppe Bundgaard 6fdc8d466e Add unit tests for various modules: attachments grouping, department weather caching behaviors, economic module order sanitization, enriched order batching, and user cashier name lookups. Update related route logic for enhanced data fetching and caching integrations. 2026-03-24 14:59:16 +01:00
Jeppe Bundgaard 219f739b54 Invalidate user permission and session caches when group permissions change; add tests. 2026-03-19 17:13:45 +01:00
Jeppe Bundgaard d890d589ff Add reusable routes for department self-serve machine types, n8n workflows, and executions, with corresponding unit tests and service integration. 2026-03-16 11:36:48 +01:00
Jeppe Bundgaard a22a3f4ee9 Add comprehensive unit tests for invoicing period cache logic, system search behavior, and OpenAPI spec coverage. Expand search service with generic entity support and refine association type handling. 2026-03-12 21:21:14 +01:00
Jeppe Bundgaard 1190290899 Strengthen SQL injection safeguards across objects and traits, add input validation and sanitization, and refine query efficiency with deduplication and null checks. 2026-03-12 20:36:08 +01:00
Jeppe Bundgaard 4523115584 Introduce centralized date normalization and duplicate filtering for invoicing logic, and add comprehensive unit tests 2026-03-12 16:09:54 +01:00
Jeppe Bundgaard 2ca29a77f1 Optimize order and transaction processing logic with caching, and implement opt-in Slack summaries to reduce request latency. 2026-03-12 16:00:57 +01:00
Jeppe Bundgaard ddc45bf206 Update getCustomersWithVehicleSubscriptions to exclude fixed pricing customers and remove unused return statement in invoicing route 2026-03-12 12:17:52 +01:00
Jeppe B 3ec338457e Clarify self-serve entity relationships and naming intent 2026-03-11 13:54:11 +01:00
Jeppe Bundgaard 44a0146c9f Enable permission checks, adjust weekly iteration logic, and update cache key for department weekly results functionality 2026-03-11 11:21:14 +01:00
Jeppe Bundgaard 15a7a7b8a5 Add weekly department results route, enhance date handling in invoicing and statistics logic, and improve Slack notification configuration 2026-03-11 10:52:49 +01:00
Jeppe Bundgaard da8a01479b Add callGateAndHangupWhenAccepted method to Bird API client, refactor gate opening logic in birdVoiceWebhooksRoute, and implement separate entrance/exit gate handling in department_gates_o. 2026-03-04 14:16:53 +01:00
Jeppe Bundgaard b46d29c87f Add validation to ensure orders have transactions and wash certificates attached before sending to customers 2026-03-03 15:07:26 +01:00
Jeppe Bundgaard 7a43fbf383 Add department_relay_config and department_gate_config classes and refactor gate/relay handling logic to use strongly-typed configuration models 2026-03-03 12:24:01 +01:00
Jeppe B acc913c9b5 Implement department gates and relays objects and routes 2026-03-03 12:01:02 +01:00
Jeppe Bundgaard 29b6df381e Add department_relays and department_gates object classes to support relay and gate management for departments 2026-03-03 11:47:11 +01:00
Jeppe Bundgaard 7efc73d19d Add dynamic_image_id to guest lane response and streamline department lane image access logic 2026-03-02 16:16:13 +01:00
Jeppe Bundgaard 24842ceaee Add support for fetching self-serve status in departments and include it in guest route responses 2026-03-02 13:13:55 +01:00
Jeppe Bundgaard 32f017778f Add voice call management endpoints and enhance logging for HTTP requests 2026-02-27 01:29:32 +01:00
Jeppe Bundgaard ea7633a908 Enhance departmental goal tracking by adding yearly and to-date progress calculations 2026-02-27 00:31:24 +01:00
Jeppe Bundgaard ece9f5108a Enhance progress tracking by adding yearly and to-date calculations for departmental targets 2026-02-27 00:23:02 +01:00
Jeppe Bundgaard 49f07c40c8 Add time-based progress tracking and department-specific target calculations
- Added support for `today`, `week`, and `month` progress tracking in `GoalsCriteria`.
- Introduced `setTimeframeByName` method to manage time-based progress criteria.
- Enhanced `calculateProgressFromArray` and `calculateProgressDetailsFromArray` to include customizable timeframes.
- Updated departmental progress calculations with detailed breakdowns for multiple time periods.
- Replaced obsolete single-value progress tracking with comprehensive progress details.
2026-02-25 14:30:03 +01:00
Jeppe Bundgaard cc494583e0 Add support for time-based departmental progress tracking
- Introduced calculation of departmental progress for today, week, and month in `department_goals_o.php`.
- Removed unnecessary blank line in `object_property.php` for code clarity.
2026-02-25 14:20:25 +01:00
Jeppe Bundgaard 11a677416b Enhance department goal criteria handling
- Refactored department daily targets logic for optimization and better maintainability.
- Ensured department-specific targets are validated, sanitized, and consistently applied in updates.
- Improved database interaction safety by preventing unnecessary updates for unchanged object properties.
- Adjusted route and API behavior for criteria and department updates to handle validations comprehensively.
2026-02-25 14:15:19 +01:00
Jeppe Bundgaard ffc5d6bc21 Add support for per-department custom daily targets
- Introduced `department_daily_targets` field in criteria, renderer, and API to define daily target overrides for departments.
- Enhanced daily target logic to honor per-department overrides while maintaining backward compatibility.
- Updated SMS, email, and Slack renderers for consistent enforcement of text length limits with fallback to non-mbstring functions.
- Refactored order item update logic to improve database interaction safety by using setters.
2026-02-25 13:03:04 +01:00
Jeppe Bundgaard 5cc311ae32 Add Redis-based permission caching for users and subusers
- Introduced Redis-backed caching for user and subuser permission evaluations in the `route_t` trait, reducing database queries.
- Enhanced `Redis` class with methods for permission caching: `cache_permission`, `get_permission`, and `clear_permission`.
- Added test coverage for the new caching logic in `PermissionRedisCacheTest.php`.
- Implemented Redis caching for authentication sessions with `cache_auth_session`, `get_auth_session`, and `clear_auth_session`.
- Improved CORS handling for preflight requests in `index.php`.
2026-02-24 15:00:22 +01:00
Jeppe Bundgaard e143f084e4 Remove language pack logic and introduce Redis caching for customer-user mapping.
- Removed all language pack-related files, traits, and classes.
- Enhanced `users_o.php` with Redis caching for mapping `customer_number` to `user_id` and vice versa.
- Added Redis checks and caching for improved performance in user retrieval methods.
2026-02-24 12:44:43 +01:00
Jeppe Bundgaard f1c0ea2228 Remove language pack management and associated logic; add detailed logging for backups and cron processes. 2026-02-24 12:36:41 +01:00
Jeppe Bundgaard b291e959e0 Add WebAuthn integration, reCAPTCHA support, and new tests
- Integrate WebAuthn library for passkey authentication workflows, including assertion verification and improved error handling.
- Add support for reCAPTCHA token validation across multiple endpoints for enhanced security.
- Extend OpenAPI schema to document new fields and restructured payloads.
- Add unit tests for WebAuthn flows, permission initialization, and route validation to ensure robustness and accuracy.
2026-02-24 09:27:51 +01:00
Jeppe Bundgaard 63c88a463d Refactor passkey and token processing for improved consistency and validation
- Update passkey data mapping to use associative arrays and handle JSON decoding for `transports`.
- Refactor token caching logic to validate database existence and clear stale entries.
- Improve 2FA handling by centralizing `token->type` and `user_id` processing for reuse.
2026-02-23 22:44:06 +01:00