- 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.
- 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.
- Added new enum values (`REVENUE`, `VISITS`, `NONE`) for `Criteria type` in `GoalsCriteria`.
- Introduced `GoalProgressDetails` schema for tracking progress metrics (count, target).
- Extended `DepartmentGoal` to include time-based progress tracking (`today`, `week`, `month`) and departmental distribution of progress.
- 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.
- 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.
- 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.
- 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`.
- Integrated Redis caching in the autoloading process to store and retrieve class and file paths dynamically.
- Added fallback mechanisms for Redis errors to ensure compatibility.
- Cached module directories and individual class paths with expiration to enhance performance and reduce filesystem scans.
- Replaced manual file inclusion with `spl_autoload_register` for dynamic loading of classes, interfaces, traits, and modules.
- Added support for autoloading across core folders (`classes`, `interfaces`, `traits`, etc.) and module directories.
- Introduced a fallback mechanism for module-specific class loading with suffix-based file matching.
- Improved maintainability and scalability by eliminating extensive manual requires.