Introduce goals module with methods for result, percentage, and remaining calculations

- Add `goals` class for managing goal metrics and calculations.
- Extend `goals_criteria` with timeframe initialization and validation.
- Implement `getListByCriteria` in `order_items_o.php` for product-based goal evaluation.
- Add unit tests for `goals` to validate
This commit is contained in:
Jeppe Bundgaard
2026-01-26 16:24:23 +01:00
parent f94efa7c59
commit 51b8198a67
6 changed files with 181 additions and 6 deletions
+3 -2
View File
@@ -4,6 +4,8 @@ namespace routes;
use classes\entra;
use classes\redis;
use goals\classes\goals;
use goals\classes\goals_criteria;
use objects\departments_o;
use traits\route_t;
@@ -49,8 +51,7 @@ class exampleRoute
$this->get('/debug', function () {
global $response;
$entra = new entra();
$GraphClient = $entra->getGraphClient();
$goal = (new goals());
$response->success(['message' => 'Debugging route!']);
});
}