Гант: отрицательные дни, этапы До CP-0 / Договоры PreConstruction / Договор Construction, Пермит после договоров; предупреждение о сроке только при наличии зависимостей
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,8 @@ export interface ParsedConstraint {
|
||||
recurring: "weekly" | "daily" | null;
|
||||
}
|
||||
|
||||
const numbers = (s: string): number[] => [...s.matchAll(/\d+/g)].map((m) => Number(m[0]));
|
||||
/** Числа в тексте; «-2» - отрицательный день только если минус не приклеен к цифре слева («0-44» - диапазон). */
|
||||
const numbers = (s: string): number[] => [...s.matchAll(/(?<!\d)-\d+|\d+/g)].map((m) => Number(m[0]));
|
||||
|
||||
/**
|
||||
* Разбор поля date_constraint (дни от первой встречи с архитектором).
|
||||
@@ -149,7 +150,7 @@ export function computeSchedule(rows: ProcessRow[]): Schedule {
|
||||
};
|
||||
timings.set(id, t);
|
||||
|
||||
if (!c.recurring && t.fromConstraint && end < depEnd) warnings.push({ id, message: `срок (день ${end}) раньше окончания предшественников (день ${depEnd})` });
|
||||
if (!c.recurring && t.fromConstraint && row.dependsOn.length > 0 && end < depEnd) warnings.push({ id, message: `срок (день ${end}) раньше окончания предшественников (день ${depEnd})` });
|
||||
if (c.start !== null && c.end !== null && d !== null && Math.abs(end - start - d) > 7) warnings.push({ id, message: `срок ${start}→${end} (${end - start} дн.) не сходится с длительностью ${d} дн.` });
|
||||
return t;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user