Commit Graph
444 Commits
Author SHA1 Message Date
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 482a17f093 Add unit tests for cleaner and machine relay flows, refactor relay logic with hard set methods, enhance route handling for lane state transitions, and update session management. 2026-03-25 15:08:50 +01:00
Jeppe Bundgaard 416eba7de5 Add unit tests and route updates for department self-serve enabled flag relay synchronization. Refactor relay handling with hard set methods and lane status guard bypass. 2026-03-25 14:24:30 +01:00
Jeppe Bundgaard 2a9ed5af0f Add unit tests for STOP command flow, including relay shutoff sequencing, vehicle-type product addition, and invoice handling. Refactor STOP logic to enable relay configuration checks, error handling, and session finalization without blocking. 2026-03-25 14:12:31 +01:00
Jeppe Bundgaard 4c81cfd0fe Add unit tests for lane relay Shelly batching, rate limit handling, and retry logic. Refactor Shelly relay state handling with snapshot caching, readiness checks, and reduced delay intervals. 2026-03-25 13:40:12 +01:00
Jeppe Bundgaard 5a29683fe8 Add MACHINE_PROGRAM_PICKER and MACHINE_CLEANER relay endpoints with GET/POST actions, unit tests, retry logic, and OpenAPI spec updates. 2026-03-25 12:21:47 +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 28b571e2e6 Add unit tests for advanced target duration parsing, goal range calculations, and Workfeed query normalization. Extend OpenAPI spec with updated schemas and examples. 2026-03-24 11:35:13 +01:00
Jeppe Bundgaard 8c9388546b Add advanced target duration configurations and parsing logic to Goals module. Update Workfeed with new CompanyID config. Extend OpenAPI spec with detailed schema mappings and examples. 2026-03-24 11:23:08 +01:00
Jeppe Bundgaard 48a74ad34d Add Workfeed module with routes, configurations, and API integration handling for employees, shifts, and departments. Update OpenAPI spec and include unit tests for endpoint wiring and filtering logic. 2026-03-24 10:33:17 +01:00
Jeppe Bundgaard 7c55beae42 Refactor self-serve wash flow to decouple visible question logic, improve condition evaluation, and handle nullable fields in the OpenAPI spec. 2026-03-18 13:05:41 +01:00
Jeppe Bundgaard bd4a90cdaa Add bulk booked invoice line handling and optimized distribution logic for department 75. Update unit tests, Economic endpoint URL encoding, and service integration. 2026-03-17 14:53:20 +01:00
Jeppe Bundgaard 2ecae070a2 Add documentation for the self-serve module, detailing architecture, flow, API routes, domain model, runtime tables, and eligibility rules. Includes end-to-end examples and PHP usage. 2026-03-16 13:06:17 +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 4ef20a1c90 Add economic V2 modules for history backfill, comparison, and distribution services. 2026-03-12 17:57:27 +01:00
Jeppe B 527e6a9ec4 Document WeatherAPI and department weather endpoints in OpenAPI 2026-03-11 13:56:29 +01:00
Jeppe Bundgaard 682bf8151c Introduce Bird module with API integration for voice calls and number management, along with configurable channelId and workplaceId. 2026-03-09 10:18:16 +01:00
Jeppe Bundgaard 16bcc3a00c Add custom monthly target calculation in goals_progress_alert_renderer for specific periods. 2026-03-09 09:58:48 +01:00
Jeppe Bundgaard cc77066617 Reapply "Update Bird module to use AccessKey authorization header instead of Bearer, improve error handling, and add support for workspace/channel configuration."
This reverts commit 1087ffb413.
2026-02-27 03:15:38 +01:00
Jeppe Bundgaard 1087ffb413 Revert "Update Bird module to use AccessKey authorization header instead of Bearer, improve error handling, and add support for workspace/channel configuration."
This reverts commit 2ad9bcfd37.
2026-02-27 03:09:48 +01:00
Jeppe Bundgaard 2ad9bcfd37 Update Bird module to use AccessKey authorization header instead of Bearer, improve error handling, and add support for workspace/channel configuration. 2026-02-27 03:08:28 +01:00
Jeppe B 0bb032bd0f Fix selfserve lane logging bootstrap dependency handling 2026-02-27 02:02:30 +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 a0727cd14e Add optional per-department weekly targets and update related calculations 2026-02-27 01:11:22 +01:00
Jeppe Bundgaard f74210bca8 Add date range fields to goal criteria and update OpenAPI documentation 2026-02-27 00:46:30 +01:00
Jeppe Bundgaard 647b7f2d94 Refactor progress calculation to avoid mutating instance and improve clarity 2026-02-27 00:32:41 +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 88f4f34c34 Update department daily targets to support floats
- Refactored `department_daily_targets` logic to accept and process float values instead of integers.
- Adjusted relevant type declarations, validations, and calculations in `GoalsCriteria`.
- Updated OpenAPI schema to align with new data type for per-department daily targets.
2026-02-25 14:40:26 +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 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 860b5ac6e3 Add OpenAPI v1 documentation for Bookings API
- Introduced Writerside topics for multiple endpoints in the Bookings module, including user, admin, and public time booking routes.
- Added `Bookings_OpenAPIv1.json` specification defining API paths, schemas, and security configurations.
- Included endpoint details for operations like booking retrieval, updates, deletion, syncing, and timebookings.
2026-02-24 11:38:41 +01:00
Jeppe Bundgaard 5a59562e35 Add Bird API integration with voice call and flash call support
- Implement Bird API client (`bird.php`) for handling HTTP requests to Bird services.
- Add routes for voice and flash call management (`birdVoiceFlashCallsRoute.php`, `birdNumbersRoute.php`).
- Introduce test cases for voice calls, flash calls, and numbers (`VoiceCallsApiTest.php`, `NumbersAndFlashCallsApiTest.php`).
- Include configuration management classes and APIs for enabling the Bird module and managing API keys (`bird_c.php`).
- Provide OpenAPI specifications for flash call endpoints (`bird-flash-calls.md`).
2026-02-19 12:19:36 +01:00
Jeppe Bundgaard 6d09e5449e Enhance MACHINE relay control logic and add emergency override functionality
- Add `forceTurnOffMachineRelay` method for superuser/emergency operations to bypass gating restrictions.
- Enforce `toggle_after = 0` to prevent auto-toggle behavior.
- Update routes to explicitly reflect relay state when modifying MACHINE relay.
- Extend Shelly device switch handling with optional `skip_toggle_after` parameter.
2026-02-19 11:37:16 +01:00
Jeppe Bundgaard 4bdbe40329 Add superuser endpoints for forced MACHINE relay control
- Implement emergency operations to forcibly enable or disable MACHINE relays (`forceTurnOnMachineRelay`).
- Add OpenAPI specifications for `/modules/self-serve/lane/force/machine/enable` and `/modules/self-serve/lane/force/machine/disable`.
- Update route definitions and introduce validation for input parameters.
2026-02-19 10:39:43 +01:00
Jeppe Bundgaard 28a4a9d8e6 Add StopTurnsOffRelayTest to verify machine relay behavior during STOP with self-serve enabled
- Introduce a minimal, self-contained test to ensure the relay turns off when STOP is executed.
- Enhance `selfserve_lane_command_t` to handle relay shutdown based on department configuration.
- Include `isDepartmentSelfServeEnabled` method for testing override and I/O avoidance.
2026-02-18 16:14:33 +01:00
Jeppe Bundgaard 9881e57698 Ensure proper initialization of lane status via getter methods, refactor email template structure for better MSO compatibility, and add machine_available field to guest API response. 2026-02-18 16:06:14 +01:00
Jeppe Bundgaard f292152135 Improve email templates with MSO compatibility and enhanced styling
- Refactor header and footer to support Outlook Classic (MSO) rendering.
- Adjust logo sizing, alignment, and styles for improved consistency.
- Update inline styles for better cross-platform email rendering.
2026-02-18 15:43:19 +01:00
Jeppe Bundgaard 3f512a4fa6 Refine new customer welcome email template with inline styles, improved accessibility, and MSO-specific adjustments 2026-02-18 15:42:14 +01:00
Jeppe Bundgaard c5840c0f3e Add self-serve module loading, enum test, and update email styles/text
- Add `SelfserveLaneServicesEnumTest` to validate `selfserve_lane_services` cases.
- Update `index.php` to load self-serve module interfaces, traits, classes, helpers, and configs.
- Center Truck Wash logo in email header and adjust styling.
- Localize password reset error message in `authRoute.php` with Danish text.
2026-02-18 15:35:41 +01:00
Jeppe Bundgaard 51014bf774 Add development guidelines, testing rules, and secure routes documentation
- Add `.junie/guidelines.md` with comprehensive development instructions.
- Include `.aiassistant/rules/Creating and maintaining tests.md` and `.aiassistant/rules/Creating and securing routes.md`.
- Introduce `CACHE_SELFSERVE_LANE_KEY_ALLOWED_SERVICES` for lane service validation.
- Update `selfserve_lane_relay_controller_t` to enforce service-specific permissions for machine relay.
2026-02-18 14:13:05 +01:00
Jeppe Bundgaard 008e2af09a Add support for self-serve task services and validation logic
- Introduce `services` property to `department_selfserve_tasks_o` for task-specific functionalities.
- Add service validation and normalization via `selfserve_lane_services` enum.
- Extend `departmentSelfserveTasksRoute` to handle `services` input for add/edit operations.
- Create `selfserve_lane_services` enum to define and validate service types.
2026-02-18 12:47:00 +01:00
Jeppe Bundgaard efaed8c6cc Refactor new customer email template and attachments handling
- Update welcome email template to conditionally include corporate ID.
- Remove unused base64 signature utility and clean up the email class.
- Comment out attachments array for potential future updates.
2026-02-17 12:07:03 +01:00
Jeppe Bundgaard b7648ccc2c Update new customer email template with dynamic company data and revised signature assets
- Dynamically insert company name and corporate ID in welcome message.
- Replace signature image URLs with updated assets and ensure proper loading.
- Add utility for retrieving base64-encoded signatures to enhance flexibility.
2026-02-17 12:01:10 +01:00
Jeppe Bundgaard a31187879b Refine new customer welcome email template with enhanced styles and improved HTML structure 2026-02-17 11:46:33 +01:00
Jeppe Bundgaard 3e76bdccc2 Add HTML email template for new customer welcome email and integrate into email class 2026-02-17 11:43:14 +01:00