Implement interval intersection and subtraction methods in GridCoverage, update GridPlan and related DTOs for PlanNote integration
ci / build-backend (push) Successful in 2m45s
ci / build-frontend (push) Successful in 1m12s
ci / tests (push) Successful in 2m52s
ci / sonar (push) Successful in 8m13s

Added new methods for intersecting and subtracting time intervals in the GridCoverage class to enhance scheduling capabilities. Updated the GridPlan and GridPlanDto classes to replace string notes with a structured PlanNote type, improving note management. Enhanced the GridPlanner class to utilize these new features, ensuring better handling of scheduling conflicts and notes during grid generation. Adjusted related tests to validate the new functionality.
This commit is contained in:
Leonid Pershin
2026-07-27 11:36:06 +03:00
parent 062f4aa200
commit 96ff2cc7ab
12 changed files with 742 additions and 176 deletions
@@ -78,7 +78,7 @@ public class GridPlanPreviewTests
Slot("Повтор", SlotKind.Repeat, SlotBlockMode.FillSlot, 1),
Slot("Конец вещания", SlotKind.SignOff, SlotBlockMode.FillSlot, 1),
],
["замечание"],
[new PlanNote(false, "замечание")],
SlotsToRemove: 4,
FallbackGroupId: Guid.NewGuid(),
FallbackGroupName: "Фон",
@@ -92,7 +92,7 @@ public class GridPlanPreviewTests
Assert.Equal(plan.Profile.Name, dto.ProfileName);
Assert.Equal(4, dto.SlotsToRemove);
Assert.Equal("Фон", dto.FallbackGroupName);
Assert.Equal(["замечание"], dto.Notes);
Assert.Equal(["замечание"], dto.Notes.Select(n => n.Text));
// Описание блока — то, что читает админ вместо режима и числа.
Assert.Equal(