Skip to content

feat(dashboard): admin setting to choose which event kinds appear in the "next meeting" widget #186

Description

@mindsers

Context

The dashboard "Prochaine réunion" widget currently shows the next upcoming Event whose kind is not a day off (see getNextMeeting in app/features/dashboard/server/dashboard.server.ts). The set of kinds shown is hard-coded.

Congregations differ on what should appear there:

  • Some only want regular meetings (EventKind.Meeting).
  • Some want assemblies and special events (EventKind.Other) to be visible too.
  • Some may have custom EventKind rows in the future (e.g. field service meetings, elders' meetings) and want fine-grained control.

Proposal

Let an admin (Permission Admin or SettingsManager — TBD) configure which EventKinds the widget surfaces.

UX sketch:

  • New section in /settings (or under congregation settings): "Tableau de bord — Prochaine réunion".
  • Multi-select of available EventKind rows for the congregation. Default: all kinds except Off.
  • Persist as a Setting row (key = 'dashboard.nextMeeting.visibleKindIds', value = JSON array of kind IDs or keys).

Technical notes:

  • Reuse the existing Setting model + service. Setting has compound unique [key, congregationId] — remember to use findFirst({ where: { key } }), not findUnique (project gotcha).
  • getNextMeeting reads the setting, falls back to "all kinds except Off" when unset.
  • Off is never selectable in the UI (hard guard against re-introducing the confidentiality leak fixed on branch fix/event-widget).

Out of scope

  • Per-user preference (this is a congregation-wide setting).
  • Reordering / multiple "next" cards.

Related

Related to the security fix on branch fix/event-widget that stopped the widget from leaking other users' days off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Wishlist

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions