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:
@@ -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).' ]);
|
||||
|
||||
Reference in New Issue
Block a user