Refactor Slack notifications and enhance departmental progress calculation
- Replace `send_webhook_message` with `send_message` for improved Slack notification rendering using `goals_progress_alert_renderer`. - Add methods for calculating and retrieving departmental progress and distribution in `goals_criteria`. - Update `renderDanishPeriodSummary` and Slack cron logic to support departmental-specific summaries. - Include departmental progress in serialized goal objects for better reporting.
This commit is contained in:
@@ -248,7 +248,7 @@ function GoalsProgressAlertsCron(): void
|
||||
if (!$dept->exists()) { continue; }
|
||||
$webhook = (string)$dept->slack_webhook->value();
|
||||
if (empty($webhook)) { continue; }
|
||||
(new Slack())->send_webhook_message((string)$message, $webhook);
|
||||
(new Slack())->send_webhook_message((string)goals_progress_alert_renderer::render($criteria, $dept), $webhook);
|
||||
$sentToDept = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user