feat: add seating plan drag and quick assessment

This commit is contained in:
2026-08-17 01:49:05 +02:00
parent ad40d11d6e
commit 50f3b2d6a9
13 changed files with 891 additions and 36 deletions
@@ -162,8 +162,11 @@ public class SeatingPlanRepository(LiteDbContext db) : ISeatingPlanRepository
public void Save(SeatingPlan plan)
{
ArchivedGroupWriteGuard.EnsureActive(db, plan.GroupId);
plan.Name = plan.Name.Trim();
plan.Room = plan.Room.Trim();
// LiteDB can deserialize missing/legacy optional string fields as null even
// though the current model initializes them with an empty string.
plan.Name = plan.Name?.Trim() ?? "";
plan.Room = plan.Room?.Trim() ?? "";
plan.Assignments ??= [];
if (plan.Name.Length == 0)
throw new ArgumentException("Der Name des Sitzplans darf nicht leer sein.");
if (plan.Rows is < 1 or > 10 || plan.Columns is < 1 or > 10)