feat(events): calendar popup respects the selected category filter #115
1 changed files with 13 additions and 1 deletions
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>
commit
db4c9b8bf3
|
|
@ -61,6 +61,18 @@ const {
|
|||
const filtersOpen = 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.
|
||||
const selectedDateLabel = computed(() =>
|
||||
selectedDate.value
|
||||
|
|
@ -255,7 +267,7 @@ onBeforeRouteLeave(() => {
|
|||
day filters the feed to it and closes. -->
|
||||
<EventCalendarPopup
|
||||
v-model:open="calendarOpen"
|
||||
:events="allEvents"
|
||||
:events="calendarEvents"
|
||||
:title="t('events.nav.calendar', 'Calendar')"
|
||||
:description="t('events.calendar.pickDay', 'Pick a day to see its events')"
|
||||
@select-date="onSelectDate"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue