fix(lessons): живые обновления списка отчётов о занятии

broadcastLessonChanged() был объявлен, но нигде не вызывался —
список отчётов не обновлялся после правки, создания, отката к
версии/оригиналу и удаления. Публикация перенесена в
invalidateLessonReports(), поэтому покрыты все 10 мест вызова,
включая мутации через /api/v1/*.

lessons.js подписан на lessons_changed с дебаунсом 300 мс;
lesson_report_status продолжает слаться сразу для точечного
обновления строки.
This commit is contained in:
dev
2026-10-06 00:12:01 +03:00
parent 9f815e5143
commit 85b737c0aa
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -118,7 +118,10 @@ function invalidateSettings() { cacheDrop('setting:'); cacheDrop('share:payload:
function invalidateStudents() { cacheDrop('students:'); }
function invalidateGroups() { cacheDrop('groups:'); cacheDrop('students:'); cacheDrop('share:payload:'); }
function invalidateEntries() { cacheDrop('entries:'); cacheDrop('students:'); cacheDrop('share:payload:'); }
function invalidateLessonReports() { cacheDrop('lessons:'); cacheDrop('stats:'); cacheDrop('dashboard:'); }
function invalidateLessonReports() {
cacheDrop('lessons:'); cacheDrop('stats:'); cacheDrop('dashboard:');
broadcastLessonChanged();
}
function invalidateSessions() { cacheDrop('session:'); }
function invalidateApiKeys() { cacheDrop('apikey:'); cacheDrop('rl:apikey'); }