From 4fe6d091e02954ce247b08cdba75739c66e39d19 Mon Sep 17 00:00:00 2001 From: DCCONSTRUCTIONS Date: Sat, 25 Apr 2026 09:34:41 +0300 Subject: [PATCH] =?UTF-8?q?UI=20-=20=D0=9C=D0=95=D0=96=D0=9F=D0=A0=D0=9E?= =?UTF-8?q?=D0=95=D0=9A=D0=A2=D0=9D=D0=90=D0=AF=20=D0=9A=D0=9E=D0=9C=D0=9C?= =?UTF-8?q?=D0=A3=D0=9D=D0=98=D0=9A=D0=90=D0=A6=D0=98=D0=AF:=20=D0=B2?= =?UTF-8?q?=D1=8B=D1=80=D0=B0=D0=B2=D0=BD=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D0=B5=D1=82=D0=BA=D0=B8=20=D0=B3=D0=BB=D0=B0?= =?UTF-8?q?=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=93=D0=B0=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gantt-chart/preview/timeline-preview.tsx | 32 ++++++++++++++++--- plane-src/apps/web/styles/globals.css | 28 +++++++++++----- 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/plane-src/apps/web/core/components/gantt-chart/preview/timeline-preview.tsx b/plane-src/apps/web/core/components/gantt-chart/preview/timeline-preview.tsx index 6ae5197..9053fd5 100644 --- a/plane-src/apps/web/core/components/gantt-chart/preview/timeline-preview.tsx +++ b/plane-src/apps/web/core/components/gantt-chart/preview/timeline-preview.tsx @@ -184,6 +184,19 @@ const getTimelineTicks = (startDate: Date, endDate: Date, dayWidth: number, step }); }; +const getTimelineGridLines = (startDate: Date, endDate: Date, dayWidth: number) => { + const days = getDaysBetween(startDate, endDate); + + return Array.from({ length: days + 1 }, (_, index) => { + const date = addDays(startDate, index); + return { + id: date.toISOString(), + isMonthStart: date.getDate() === 1, + left: index * dayWidth, + }; + }); +}; + const getShortDateLabel = (date: Date, locale: string) => new Intl.DateTimeFormat(locale || "ru-RU", { day: "numeric", @@ -204,10 +217,11 @@ const isOverdueItem = (item: TGanttTimelinePreviewItem, today: Date) => { const matchesStatusFilters = (item: TGanttTimelinePreviewItem, activeStatusFilters: TGanttPreviewStatusFilter[]) => { if (activeStatusFilters.length === 0) return true; - if (!item.state_group) return false; + const stateGroup = item.state_group; + if (!stateGroup) return false; return activeStatusFilters.some((filterKey) => - GANTT_STATUS_FILTER_OPTIONS.find((option) => option.key === filterKey)?.groups.includes(item.state_group) + GANTT_STATUS_FILTER_OPTIONS.find((option) => option.key === filterKey)?.groups.includes(stateGroup) ); }; @@ -304,6 +318,7 @@ export function GanttTimelinePreview(props: TGanttTimelinePreviewProps) { return { blocks, canvasWidth, + gridLines: getTimelineGridLines(startDate, endDate, settings.dayWidth), ticks: getTimelineTicks(startDate, endDate, settings.dayWidth, settings.tickStepDays, locale), todayLabel: getShortDateLabel(today, locale), timelineWidth, @@ -517,9 +532,18 @@ export function GanttTimelinePreview(props: TGanttTimelinePreviewProps) { >