2025-04-30 14:43:38 +02:00
|
|
|
<?php
|
|
|
|
|
|
2025-06-17 12:24:17 +02:00
|
|
|
// page.update:after && page.changeStatus:after
|
2026-01-15 11:42:20 +01:00
|
|
|
return function($newPage, $oldPage) {
|
2025-05-27 11:14:52 +02:00
|
|
|
$project = $newPage->template() == 'project' ? $newPage : $newPage->parents()->findBy('template', 'project');
|
|
|
|
|
if ($project) {
|
2026-01-15 11:42:20 +01:00
|
|
|
$project->rebuildStepsCache();
|
|
|
|
|
// Invalider aussi le cache des notifications (briefs validés, etc.)
|
|
|
|
|
$project->invalidateNotificationsCache();
|
2025-05-27 11:14:52 +02:00
|
|
|
}
|
2025-04-30 14:43:38 +02:00
|
|
|
};
|