From 7f775abf6a3776d378be1564d410638a04361d61 Mon Sep 17 00:00:00 2001 From: Egor Pozharov Date: Thu, 16 Apr 2026 15:48:51 +0600 Subject: [PATCH] remove empty line and add empty cells for calendar month start alignment --- docker-compose.prod.yml | 1 - frontend/src/pages/Dashboard.tsx | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index f6b941c..42f2a8b 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -28,7 +28,6 @@ services: interval: 10s timeout: 5s retries: 5 - depends_on: postgres: condition: service_healthy diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index c6de4d2..1ed9002 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useMemo } from 'react'; import { Plus, Printer, ChevronRight, CalendarDays } from 'lucide-react'; -import { format, startOfMonth, endOfMonth, eachDayOfInterval, isToday } from 'date-fns'; +import { format, startOfMonth, endOfMonth, eachDayOfInterval, isToday, getDay } from 'date-fns'; import { ru } from 'date-fns/locale'; import { useDeliveryStore } from '../stores/deliveryStore'; import type { Delivery } from '../types'; @@ -149,6 +149,9 @@ const Dashboard = ({ onDateSelect, onAddDelivery }: DashboardProps) => {
+ {Array.from({ length: (getDay(startOfMonth(currentMonth)) + 6) % 7 }).map((_, i) => ( +
+ ))} {days.map((day) => { const count = getCountForDate(day); const isTodayDate = isToday(day);