feat(events): calendar popup respects the selected category filter

The date-picker popup showed dots for all events regardless of the
active category filter. Feed it a category-filtered set so its per-day
dots reflect what the user is browsing (temporal/day filters still don't
apply — the calendar is for picking any date). No categories selected
behaves as before (all events).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-17 19:06:52 +02:00
commit db4c9b8bf3

View file

@ -61,6 +61,18 @@ const {
const filtersOpen = ref(false) const filtersOpen = ref(false)
const calendarOpen = ref(false) const calendarOpen = ref(false)
// Events feeding the calendar popup's per-day dots. Respects the active
// category filter (so the calendar reflects what the user is browsing),
// but not the temporal/day filters the calendar is for picking any
// date. No categories selected all events.
const calendarEvents = computed(() =>
selectedCategories.value.length
? allEvents.value.filter(
(e) => e.category && selectedCategories.value.includes(e.category),
)
: allEvents.value,
)
// Human label for the active day filter, shown as a removable chip. // Human label for the active day filter, shown as a removable chip.
const selectedDateLabel = computed(() => const selectedDateLabel = computed(() =>
selectedDate.value selectedDate.value
@ -255,7 +267,7 @@ onBeforeRouteLeave(() => {
day filters the feed to it and closes. --> day filters the feed to it and closes. -->
<EventCalendarPopup <EventCalendarPopup
v-model:open="calendarOpen" v-model:open="calendarOpen"
:events="allEvents" :events="calendarEvents"
:title="t('events.nav.calendar', 'Calendar')" :title="t('events.nav.calendar', 'Calendar')"
:description="t('events.calendar.pickDay', 'Pick a day to see its events')" :description="t('events.calendar.pickDay', 'Pick a day to see its events')"
@select-date="onSelectDate" @select-date="onSelectDate"