feat: добавил поле организация во все заявки, а также расширил компонет выбора даты для ui-kit

This commit is contained in:
Тимур Городецкий
2026-08-25 11:43:57 +05:00
parent a146877327
commit 3b4ee93b48
55 changed files with 641 additions and 143 deletions
@@ -0,0 +1,16 @@
function pad2(n: number): string {
return n < 10 ? `0${n}` : `${n}`;
}
/** Сегодня + n дней в формате YYYY-MM-DD (для min/max у input type=date). */
export function isoDatePlusDays(days: number): string {
const d = new Date();
d.setDate(d.getDate() + days);
return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;
}
/** YYYY-MM-DD → дд.мм.гггг, для текста ошибок валидации. Невалидную строку возвращает как есть. */
export function formatIsoDate(iso: string): string {
const [y, m, d] = iso.split('-');
return y && m && d ? `${d}.${m}.${y}` : iso;
}