From a78917583ec0a99898941443d147938132178b64 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Sun, 1 Dec 2024 12:02:08 +0200 Subject: [PATCH] add coderabit suggestions --- .../components/date-range-select.tsx | 33 +++++++---- .../components/export-mode-select.tsx | 2 +- .../components/time-report-table.tsx | 55 +++++++++++++++++++ .../[locale]/reports/weekly-limit/page.tsx | 50 +++++------------ apps/web/app/constants.ts | 2 + 5 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 apps/web/app/[locale]/reports/weekly-limit/components/time-report-table.tsx diff --git a/apps/web/app/[locale]/reports/weekly-limit/components/date-range-select.tsx b/apps/web/app/[locale]/reports/weekly-limit/components/date-range-select.tsx index 552187ce6..980e9269b 100644 --- a/apps/web/app/[locale]/reports/weekly-limit/components/date-range-select.tsx +++ b/apps/web/app/[locale]/reports/weekly-limit/components/date-range-select.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import { endOfMonth, endOfWeek, format, startOfMonth, startOfWeek, subDays } from 'date-fns'; +import { endOfMonth, endOfWeek, format, isSameDay, startOfMonth, startOfWeek, subDays, subMonths } from 'date-fns'; import { Calendar as CalendarIcon } from 'lucide-react'; import { DateRange } from 'react-day-picker'; import { cn } from '@/lib/utils'; @@ -78,8 +78,12 @@ export function DatePickerWithRange({