fix: oprava zobrazení statistik pro aktuální týden
CI / Generate TypeScript types (push) Successful in 16s
CI / Server unit tests (push) Successful in 25s
CI / Build server (push) Successful in 28s
CI / Build client (push) Successful in 41s
CI / Playwright E2E tests (push) Successful in 1m46s
CI / Build and push Docker image (push) Successful in 48s
CI / Notify (push) Successful in 2s

This commit is contained in:
2026-08-25 10:04:55 +02:00
parent 936ce2a9e4
commit 9027de5f8b
4 changed files with 40 additions and 6 deletions
+2 -3
View File
@@ -126,9 +126,8 @@ export default function StatsPage() {
const isCurrentOrFutureWeek = useMemo(() => {
if (!dateRange) return true;
const currentWeekEnd = getLastWorkDayOfWeek(new Date());
currentWeekEnd.setHours(23, 59, 59, 999);
return dateRange[1] >= currentWeekEnd;
// Porovnáváme jen dny (obě data nesou čas svého vzniku), dopředu jde jít nejvýše na aktuální týden
return formatDate(dateRange[1]) >= formatDate(getLastWorkDayOfWeek(new Date()));
}, [dateRange]);
const handleKeyDown = useCallback((e: any) => {