Add animated classroom grouping with saved editable plans
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
admin committed 2026-09-29 22:17:49 +02:00
1 parent d4b1419f9a
commit f0462bd2a1
27 files changed
+775 -46

No files matched your search

+16
View File
@@ -179,6 +179,22 @@ public class FakeSeatingPlans(List<SeatingPlan>? initial = null) : ISeatingPlanR
public void Restore(Guid trashId) { }
}
public class FakeStudentGroupPlans : IStudentGroupPlanRepository
{
private readonly List<StudentGroupPlan> _plans = [];
public StudentGroupPlan? GetById(Guid id) => _plans.FirstOrDefault(p => p.Id == id);
public List<StudentGroupPlan> GetByGroup(Guid groupId) =>
_plans.Where(p => p.GroupId == groupId).ToList();
public List<StudentGroupPlan> GetByStudent(Guid studentId) =>
_plans.Where(p => p.Groups.Any(g => g.StudentIds.Contains(studentId))).ToList();
public void Save(StudentGroupPlan plan)
{
_plans.RemoveAll(p => p.Id == plan.Id);
_plans.Add(plan);
}
public void Delete(Guid id) => _plans.RemoveAll(p => p.Id == id);
}
public class FakeTrash(List<TrashedItem>? initial = null) : ITrashRepository
{
private readonly List<TrashedItem> _all = initial ?? [];