feat: add seating plan drag and quick assessment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user