Унификация ширины полей-фильтров: все 195px, короткий год в «Период»

- .hgroup-fields: колонки 170→195px (все фильтры одинаковой ширины)
- «Период» (.dr-field) 333→195px, вровень с остальными
- Формат даты в поле «Период» — 2-значный год (05.08.26 — 20.08.26), чтобы диапазон целиком помещался в 195px; в чипсах год остался полным

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
aaverbitskiy 2026-08-17 05:13:35 +00:00
parent 5ba5a77f97
commit 147529c20f
3 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "mapdash-frontend",
"private": true,
"version": "0.2.14",
"version": "0.2.15",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -16,7 +16,8 @@ function toISO(d: Date): string {
}
function fmt(iso: string): string {
const p = iso.split('-');
return p.length === 3 ? `${p[2]}.${p[1]}.${p[0]}` : iso;
// Short 2-digit year so the full range fits the compact "Период" field.
return p.length === 3 ? `${p[2]}.${p[1]}.${p[0].slice(2)}` : iso;
}
export interface DateRange {

View File

@ -107,7 +107,7 @@ header {
.hgroup-fields {
flex-shrink: 4; min-width: 0;
display: grid;
grid-template-columns: repeat(4, 170px);
grid-template-columns: repeat(4, 195px);
gap: 12px 14px;
align-items: start;
align-content: start;
@ -124,7 +124,7 @@ header {
/* ---- date-range field + calendar popup ---- */
.field-dates { grid-column: span 2; }
.field-dates .dr-field { max-width: 333px; } /* the "Период" field is 40px narrower than its 2-col slot */
.field-dates .dr-field { max-width: 195px; } /* "Период" matches the other fields (short 2-digit-year date fits) */
.dr-native { display: none; }
.daterange { position: relative; }
.dr-field {