fix(site-finder): §4.3 график «По кварталам» — бары вылезали за край карточки (#2118)
All checks were successful
Deploy / changes (push) Successful in 8s
Deploy / build-backend (push) Has been skipped
Deploy / build-worker (push) Has been skipped
Deploy / deploy (push) Successful in 1m12s
Deploy / build-frontend (push) Successful in 3m14s

This commit is contained in:
bot-backend 2026-06-30 17:15:56 +00:00
parent babb2a3473
commit 4a7ce91db1

View file

@ -242,11 +242,18 @@ export function Pipeline24moBlock({ data }: Props) {
(q.flats / maxFlatsPerQuarter) * BAR_AREA_PX,
)
: 4;
// Компактная подпись в 2 строки: «Q2» / «'26». Полная «2026-Q2»
// (nowrap) шире ячейки → 9 кварталов выдавливали flex-ряд за
// правый край карточки. minWidth:0 ниже даёт колонкам ужиматься.
const qm = /^(\d{4})-(Q\d)$/.exec(q.quarter);
const qLabel = qm ? qm[2] : q.quarter;
const qYear = qm ? `'${qm[1].slice(2)}` : "";
return (
<div
key={q.quarter}
style={{
flex: 1,
minWidth: 0,
display: "flex",
flexDirection: "column",
justifyContent: "flex-end",
@ -267,12 +274,18 @@ export function Pipeline24moBlock({ data }: Props) {
<div
style={{
fontSize: 10,
lineHeight: 1.1,
color: "#6b7280",
whiteSpace: "nowrap",
textAlign: "center",
fontVariantNumeric: "tabular-nums",
}}
>
{q.quarter}
<div>{qLabel}</div>
{qYear && (
<div style={{ fontSize: 9, color: "#9ca3af" }}>
{qYear}
</div>
)}
</div>
</div>
);