Skip to content

feat(events): a Registrations tab for the event's own manager #1069

Description

@Ardnived

Summary

Registration rows are admin-only, so a program manager's only view of who signed up is the email that announced it, and the Events Registrations tab renders empty for them. This ticket adds a Registrations tab on an event that its own manager, and an admin, can open: name, email, date and answers, with withdrawn registrations shown separately.

Goal context

Part of #1067: the digest's New registrations section links here.

Approach

  • A custom edit-view tab on Events (admin.components.views.edit.registrations, path /registrations), a server component. A collection edit view sits behind Root's own auth redirect, so no requireAdminAccess; the tab's condition hides it from non-managers users, and the component itself is the gate: admin or event.manager === user.id, otherwise the unauthorized redirect carrying the route back as redirect.
  • Reads user-submissions of type: registration for that one event with overrideAccess: true and an explicit where, selecting only the row's own columns (senderEmail, submissionData, status, createdAt, startingAt), never users. Name comes off submissionData through readSubmissionValue, answers through buildRegistrationAnswers(answersFrom(submissionData)), as SendRegistrationDigests does.
  • Two filters, Active and Withdrawn, drawn by isActiveRegistration (src/lib/registrations/active.ts), kept in the URL as AtlasManagerView keeps its tab. Columns: name, email, registered on, status, answers. Same Table, Pill and filter-button idiom as src/components/admin/Dashboard/AtlasManager/AtlasManagerView.tsx, with Pagination past one page.
  • The registrations join on Events (src/collections/Events/Events.ts:552) stays, behind an admin-only admin.condition: it is the admin's drawer-open path, and it renders empty for every manager.

Reuse

The prototype's "Region manager home" artboard (https://claude.ai/artifact/EEEx2P7pijazypguUsp59N, private) shows the table idiom; this tab is one such table with two filters. Reuse Table, Pill, Button and Pagination from @payloadcms/ui, tableColumn and CenteredNotice from src/components/admin/, the filter-button row and useProgramQuery from AtlasManagerView (lift the hook to src/components/admin/helpers/ once this is its second consumer), and readSubmissionValue, answersFrom, buildRegistrationAnswers, isActiveRegistration and formatShortDate. Nothing new to build.

Interfaces

Provides the route /admin/collections/events/<id>/registrations, which the digest child links from its New registrations section.

Provides GET /api/events/:id/registrations/csv, admin-panel only.

Acceptance criteria

  • The event's manager sees that event's registrants, with name, email, date and answers.
  • Another manager, region manager included, opening the route is redirected to the unauthorized view.
  • An admin sees the same tab and still has the join on the edit view.
  • The page reads no users row and no other event's rows.
  • Three filters — Accepted, Pending, Withdrawn — each carrying its own count, Accepted first. A withdrawn row says which of rejected, spam or failed it is, beside the row. (review, Ardnived, 2026-11-04)
  • The Registrations tab carries a count of accepted registrations, behind the view's own gate, so a refused visitor does not learn it. (review, Ardnived, 2026-11-04)
  • GET /api/events/:id/registrations/csv serves the accepted registrants as a spreadsheet through that same gate, one column per question anyone answered. (review, Ardnived, 2026-11-04)
  • The gate refuses a manager the event still names once their account is inactive. (review, Ardnived, 2026-11-04)

Verification checklist

  • pnpm exec vitest run tests/int/atlas-manager.int.spec.ts --config ./vitest.config.mts, with a case for each criterion above that drives the view's loader directly.
  • pnpm exec vitest run tests/unit/sanitized-config-rules.spec.ts tests/unit/client-bundle-safety.spec.ts --config ./vitest.config.mts after pnpm generate:importmap.
  • .claude/skills/pr-prep/check.sh
  • On the PR preview, as an event's manager: /admin/collections/events/<id>/registrations lists its registrants with all three filters, and Download accepted (CSV) returns a file. As another manager: redirected, and the CSV route answers 403.

Notes

Activity

  1. added theissue type on Nov 2, 2026
  2. Ardnived commented on Nov 2, 2026

    @Ardnived
    ContributorAuthor

    @sydevs-bot implement

  3. added
    bot:working
    on Nov 2, 2026
  4. sydevs-bot commented on Nov 2, 2026

    @sydevs-bot
    Contributor

    🤖 no session running
    approved by Ardnived

    recent dispatches
    • 21:17Z implement · attempt 1 · session · done
    • 21:17Z implement · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  5. moved this from Awaiting to Working in SYDevelopers Technical Roadmapon Nov 2, 2026
  6. removed
    bot:working
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions