feat(students): add active/paused/left status with hidden filter

This commit is contained in:
dev
2026-10-23 09:14:19 +03:00
parent 1da6b5e107
commit c2cc7db26d
9 changed files with 132 additions and 36 deletions
+2
View File
@@ -187,6 +187,8 @@ throws('пустой action в audit_log отклоняется', () => normaliz
throws('не-объект в notifications.target отклоняется', () => normalizeRestoreData({ ...base, notifications: [{ id: 1, type: 'x', title: 'T', target: [1, 2, 3] }] }));
throws('группа без id отклоняется', () => normalizeRestoreData({ ...base, groups: [{ name: 'G' }] }));
throws('путь вне uploads отклоняется', () => normalizeRestoreData({ ...base, students: [{ id: 1, name: 'S', photo_path: '/etc/passwd' }] }));
const stuStatus = normalizeRestoreData({ ...base, students: [{ id: 1, name: 'S', status: 'left' }, { id: 2, name: 'T', status: 'nope' }] });
ok('статус ученика сохраняется, неизвестный -> active', stuStatus.students[0].status === 'left' && stuStatus.students[1].status === 'active', stuStatus.students);
throws('notifications не массив отклоняется', () => normalizeRestoreData({ ...base, notifications: { nope: 1 } }));
const legacy = normalizeRestoreData({ version: 1, groups: [{ id: 1, name: 'G' }] });