Skip to content
SprecherEast
Issue 471

enhancement: Search results show the Cancelled label on cancelled events

Back to our plan
Done
enhancementfrontendcmspriority: low

Summary

A cancelled event shows "Cancelled" on its card, in the sidebar and on its own page (#122). Search results don't show it yet: a resident searching for an event could see it without the label.

Details

Search results come from copies that the search plugin makes (@payloadcms/plugin-search), and those copies have no cancelled field. Events in the results also render as PostCard. Fixing this needs:

  • a cancelled field on the search collection, plus its migration
  • the search sync (beforeSync, in the news module) copying it from events
  • the result card showing the label for events (CancelledBadge, or a status the card can show)
  • the existing search entries reindexed

Acceptance criteria

  • Not done: A cancelled event shows "Cancelled" in search results, with the same label as its card.
  • Not done: Reindexing picks up the flag for existing events, and changing the flag on an event updates its search entry.
  • Not done: Tests cover the sync and the result card.

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab