fix: all-day badge shows count for visible days only

Previously showed total allDayEvents.length (all events in the loaded
week). Now counts unique events that appear on at least one currently
visible day column, so in 1-day view it shows that day's count, in
3-day view the count across those 3 days, etc.

v1.81.12
This commit is contained in:
mARTin 2026-04-02 10:39:51 +02:00
parent 024ceaf255
commit 091004e87e
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.81.11",
"version": "1.81.12",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js",
"scripts": {

View File

@ -5239,7 +5239,12 @@ export default function WeeklyView() {
marginTop: "1px",
}}
>
{allDayEvents.length}
{(() => {
const visibleDays = getVisibleDays();
const seen = new Set<string>();
visibleDays.forEach(d => getAllDayEventsForDate(d).forEach(e => seen.add(e.id)));
return seen.size;
})()}
</span>
</div>
)}