Jeppe Bundgaard
4bfda5aea4
Introduce modular goal criteria system for users, departments, and products
...
- Add `goals_criteria` base class implementing customizable goal criteria.
- Introduce interfaces and traits for modular handling of users, departments, and products in goal criteria.
- Include enumeration for goal types (`goals_criteria_type`).
- Implement timeframe and target management through traits.
- Provide initial configuration for enabling the goals module.
2026-01-26 16:01:47 +01:00
Jeppe Bundgaard
e1e6d9c911
Sort departments by order_priority in Slack statistics notification.
2026-01-26 14:11:13 +01:00
Jeppe Bundgaard
9b9713ecc1
Add order_priority field to departments
...
- Introduce `order_priority` property in `departments_o.php`.
- Update `departmentsRoute.php` to handle `order_priority` in input and output.
- Adjust object initialization and serialization for the new field.
2026-01-26 13:53:25 +01:00
Jeppe Bundgaard
16f041600c
Refactor Slack notification logic in departments_o.php and exampleRoute.php
...
- Update `send_webhook_message` to include custom department webhook.
- Add `sendSlackInternalStatisticNotification` to handle additional statistics notifications.
2026-01-26 13:15:38 +01:00
Jeppe Bundgaard
88d3e20de6
Expire department webhook in Redis and refactor Slack notification logic
...
- Add 5-minute expiration for cached department webhooks in `redis.php`.
- Cast department ID to integer in `departments_o.php`.
- Refactor Slack notification logic to use `send_webhook_message` for custom department webhooks.
- Update `send_webhook_message` visibility from protected to public in `slack.php`.
2026-01-26 13:09:21 +01:00
Jeppe Bundgaard
64faea9324
Add password reset endpoint and refactor booking count logic
...
- Introduce `POST /auth/password-reset/request` endpoint in test and `authRoute.php`.
- Refactor bookings route to use a new method `getDailyUnfulfilledBookingsCountForDepartment`
2026-01-22 14:38:54 +01:00
Jeppe Bundgaard
29c53c3b70
Improve Slack message formatting and update date handling in department statistics
...
- Apply Markdown formatting to Slack messages for better readability.
- Adjust date range to end on the previous day in `workerRoute.php`.
- Refactor department loop output for consistent indentation and styling.
2026-01-22 12:53:38 +01:00
Jeppe Bundgaard
e0e479a15d
Introduce method-level caching for department reports to enhance performance
...
- Wrap report calculation logic in `methodCacheWithParameters` for 2-minute caching.
- Standardize reusable caching logic in `db_object_t` trait.
- Refactor query-based methods to integrate caching and improve maintainability.
2026-01-22 12:18:39 +01:00
Jeppe Bundgaard
d58fa69560
Refactor addon sales calculation logic and improve date handling in reports
...
- Standardize date formatting to cover full days in queries (`00:00:00` to `23:59:59`).
- Replace direct SQL queries with reusable department methods for calculating total addons and max addons.
- Update Slack notifications to include percentage breakdown with sold/total for each department.
- Remove redundant code and improve error handling for department data retrieval.
2026-01-22 10:19:06 +01:00
Jeppe Bundgaard
127be6ece7
Disable /worker/test endpoint and update Slack notification method in workerRoute.php
2026-01-22 08:58:52 +01:00
Jeppe Bundgaard
16703f5938
Add Slack department statistics notification method and improve percentage calculation
...
- Introduce `sendSlackInternalStatisticNotification` to handle Slack notifications for department performance.
- Refactor `getThePercentageOfAddonsSoldOutOfMax` to enable reference-based updates for addon data.
- Improve date handling and filtering logic to skip null values for inclusive range filters.
2026-01-22 08:44:35 +01:00
Jeppe Bundgaard
b661e5cad6
Fix typo in comment: capitalize "Sunday" in exampleRoute.php
2026-01-21 14:57:35 +01:00
Jeppe Bundgaard
1d3e23b370
Simplify Slack message logic by removing department name from default notification.
2026-01-21 14:54:22 +01:00
Jeppe Bundgaard
a04acd84b2
Refactor Slack notification logic and clean up response format in example route.
2026-01-21 14:51:20 +01:00
Jeppe Bundgaard
d9b9958242
Fix calculation logic for max addons count by replacing division with multiplication in SQL query
2026-01-21 14:46:55 +01:00
Jeppe Bundgaard
56d0ee03d3
Update product addon sales calculation logic and refine Slack notification handling for departments
...
- Replace `COUNT` with `SUM` for accurate addon quantity tracking in sales queries.
- Implement support for filtering applicable products when calculating max addons.
- Add logic to handle custom Slack webhooks for department notifications.
- Refactor percentage calculation methods and remove redundant return statements.
2026-01-21 14:40:55 +01:00
Jeppe Bundgaard
9b41f80ea5
Add methods to retrieve and analyze product sales data, send department statistics to Slack, and implement scheduled messaging logic
2026-01-21 13:42:19 +01:00
Jeppe Bundgaard
f5d430c0c7
Add relay control functionality to selfserve_lane with selfserve_lane_relay_controller_t trait
...
Integrate relay control methods to turn on/off machine relays, introduce `selfserve_lane_relay` enum, and ensure proper validation of lane states and relay IDs.
2026-01-21 11:01:16 +01:00
Jeppe Bundgaard
ca4432374c
Add department access check and self-serve enabled status routes in departments API
2026-01-21 10:49:45 +01:00
Jeppe Bundgaard
7c8a04ff7a
Add routes to view and update the self-serve enabled status for departments
2026-01-21 10:22:25 +01:00
Jeppe Bundgaard
03dde04df6
Remove redundant return statement from selfserve_lane_port_controller_t::openRelay method.
2026-01-20 16:22:39 +01:00
Jeppe Bundgaard
25f0ea2c56
Prevent SQL injection by skipping escaping for numeric values in db_object_t filter clause
2026-01-20 13:19:36 +01:00
Jeppe Bundgaard
d4ba8b7564
Add getLaneProducts method to department_selfserve_tasks_o and implement lane product retrieval in related objects and routes; enhance object validation with requireSelected method
2026-01-20 13:19:20 +01:00
Jeppe Bundgaard
67e27f67a4
Ensure removal of existing entries for identical department, lane, reg, and question before adding new objects in department_selfserve_vehicle_conditions_o
2026-01-19 14:57:15 +01:00
Jeppe Bundgaard
da9ee98fb5
Add password reset request endpoint to authentication routes; update OpenAPI spec and improve user email handling in users_o
2026-01-19 11:17:35 +01:00
Jeppe Bundgaard
09b5c618ed
Add fine-grained permission checks for viewing department self-serve tasks and implement password reset endpoints (validate and set) in authentication routes; update OpenAPI spec accordingly.
2026-01-19 10:57:09 +01:00
Jeppe Bundgaard
eb6cc72bf5
Add customer_password_reset_keys_o class with token generation, validation, and password reset functionality.
2026-01-19 10:41:42 +01:00
Jeppe Bundgaard
574e206698
Refactor filter_string_to_array to support both strings and arrays; simplify and reuse filter parsing logic across methods.
2026-01-15 12:17:19 +01:00
Jeppe Bundgaard
d0d036bbb4
Update db_object_t filter clause docs to support array values for multi-value field filtering
2026-01-15 12:14:07 +01:00
Jeppe Bundgaard
9c9c6616db
Add new schemas for SelfServeLaneStatus and SelfServeConfig in OpenAPI spec; extend self-serve lane commands with RESERVE and RELEASE; enhance lane status and configuration endpoints with detailed request/response schemas; add support for dynamic lane ID retrieval in routes.
2026-01-15 11:47:26 +01:00
Jeppe Bundgaard
6cc5344fc2
Refactor department-level permission checks and enhance handling of empty department filters across routes and related object methods.
2026-01-15 11:28:44 +01:00
Jeppe Bundgaard
ed7299fc43
Add lane reservation support: implement reservation timer, expiration logic, and new self-serve lane commands (RESERVE and RELEASE); enhance permission checks across routes for global and department-level operations.
2026-01-15 11:22:02 +01:00
Jeppe Bundgaard
90802e9bc7
Add fine-grained permission check for viewing department self-serve questions; update authorization descriptors
2026-01-13 13:36:04 +01:00
Jeppe Bundgaard
60244dd106
Ensure error handling for invalid json_decode output by adding array validation checks across routes, traits, and response methods. Replace echo statements with standardized response error handling in module_config_t.
2026-01-13 11:56:17 +01:00
Jeppe Bundgaard
f0f87eb351
Enhance departmentSelfserveVehicleConditionsRoute with fine-grained permissions for global and own access; extend CRUD functionality to include customer-level validation and vehicle ownership checks; update OpenAPI descriptions accordingly.
2026-01-12 11:29:20 +01:00
Jeppe Bundgaard
02d46f41cf
Add CRUD operations for department/selfserve/vehicle/conditions to OpenAPI spec; define schema and enhance filtering options with new query parameters
2026-01-12 11:23:21 +01:00
Jeppe Bundgaard
92c5a03791
Add departmentSelfserveVehicleConditionsRoute with CRUD operations and department-level access control; update department_selfserve_vehicle_conditions_o to support customer_id property.
2026-01-12 11:20:51 +01:00
Jeppe Bundgaard
d8f102b764
Add department_selfserve_vehicle_conditions_o class and standardize_registration method to manage vehicle conditions and standardize registration input
2026-01-12 11:15:23 +01:00
Jeppe Bundgaard
6689ad991a
Expand object_type documentation in department_selfserve_condition_rules_o to include condition_rule.
2026-01-09 15:15:02 +01:00
Jeppe Bundgaard
97d2786ff1
Replace question_condition with condition_id across department_selfserve_questions logic, routes, OpenAPI spec, and related methods for improved consistency and clarity.
2026-01-09 13:53:03 +01:00
Jeppe Bundgaard
d576a4741b
Replace question with condition_id across department_selfserve_tasks logic, routes, OpenAPI spec, and associated methods for improved consistency and clarity.
2026-01-09 13:47:10 +01:00
Jeppe Bundgaard
c87f96ebcf
Add update method as alias for set in object_property class
2026-01-09 13:22:59 +01:00
Jeppe Bundgaard
69c2acf66f
Add id property to department_selfserve_condition_rules_o array representation
2026-01-09 13:21:45 +01:00
Jeppe Bundgaard
6b60673c99
Add condition_id query parameter and property to OpenAPI spec for enhanced filtering options
2026-01-09 12:57:20 +01:00
Jeppe Bundgaard
f7ff5d6713
Add condition_id property to department_selfserve_conditions_o and update related methods, routes, and logic
2026-01-09 12:56:11 +01:00
Jeppe Bundgaard
3aefa4a00a
Add departmentSelfserveConditionsRoute and departmentSelfserveConditionRulesRoute with CRUD operations and department-level access control; update OpenAPI spec accordingly
2026-01-09 12:36:32 +01:00
Jeppe Bundgaard
b4eda9ed9c
Add department_selfserve_conditions_o and department_selfserve_condition_rules_o for managing self-serve conditions and rules
2026-01-09 12:34:14 +01:00
Jeppe Bundgaard
e4c4c9c76d
Replace image property with question_condition in OpenAPI spec, routes, and related logic.
2026-01-09 11:19:23 +01:00
Jeppe Bundgaard
0de2fd7331
Replace image property with question_condition in department_selfserve_questions_o and refactor associated methods and fields.
2026-01-09 11:17:57 +01:00
Jeppe Bundgaard
10c1631f51
Refactor base64 validation and decoding in minio_t to handle data URI prefixes more robustly.
2026-01-09 11:01:01 +01:00