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
@@ -143,10 +143,17 @@ export function GenerateGridDialog({
</p>
)}
{/* Замечания разделены по цвету: красное останется дырой в эфире, янтарное —
повод посмотреть, но сетка соберётся. */}
{plan.notes.length > 0 && (
<ul className="flex flex-col gap-0.5 text-xs text-amber-500">
<ul className="flex flex-col gap-0.5 text-xs">
{plan.notes.map((note) => (
<li key={note}>{note}</li>
<li
key={note.text}
className={note.isError ? 'text-red-500' : 'text-amber-500'}
>
{note.text}
</li>
))}
</ul>
)}
+4 -1
View File
@@ -726,11 +726,14 @@ export type GridPlanSlotDto = {
block: string
}
/** Замечание к плану: `isError` — то, что после сборки останется дырой в эфире. */
export type PlanNoteDto = { isError: boolean; text: string }
export type GridPlanDto = {
profile: GridProfileKind
profileName: string
slots: GridPlanSlotDto[]
notes: string[]
notes: PlanNoteDto[]
/** Больше нуля только при пересборке — столько слотов будет снесено. */
slotsToRemove: number
fallbackGroupName: string | null