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.
This commit is contained in:
Jeppe Bundgaard
2026-01-22 12:53:38 +01:00
parent e0e479a15d
commit 29c53c3b70
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class workerRoute
$department = (new departments_o())->select((int)6);
$days = 7;
// The time should be from 00:00:00 of the start date to 23:59:59 of the end date
$date_end = date('Y-m-d 23:59:59'); // Today at 23:59:59
$date_end = date('Y-m-d 23:59:59', strtotime("-1 days")); // Yesterday (Sunday) at 23:59:59
$date_start = date('Y-m-d 00:00:00', strtotime("-$days days")); // $days ago at 00:00:00
$department->sendSlackInternalStatisticNotification($date_start, $date_end, [1,2,3,4,5,6,7]);
$response->success(['message' => 'Test message sent to Slack (not really, this is a placeholder).' ]);