Skip to content

feat: cover events across the admin panel, admin bar and docs - #102

Open
InnerDesires wants to merge 1 commit into
mainfrom
feat/events-admin-coverage
Open

InnerDesires wants to merge 1 commit into
mainfrom
feat/events-admin-coverage

Conversation

@InnerDesires

Copy link
Copy Markdown
Owner

What

Makes events first-class in the admin experience: admin bar, dashboard, the event/registration screens, and documentation for both tracks.

Admin bar (site toolbar for admins)

  • Removed the + create button from every entry.
  • Added Події and Календар змін (/admin/globals/home-calendar) links. Links now carry their own href, so globals and collections share one list.
  • Added data-testid="admin-bar"; the small-screen hiding rule is untouched.

Admin panel

  • Dashboard: counters for Події and Реєстрації на події, plus a Нова подія quick action.
  • Event page in admin: new registrations join field lists who registered (virtual, no schema change/migration). Its Додати новий button opens the registration drawer with the event pre-filled, so admins can register someone by hand.
  • event-enrollments: user and event were admin.readOnly, which made manual sign-ups impossible even though the hook allows admins to bypass capacity/finished/draft rules. They are now editable on create only via field-level access.update: () => false, so an existing registration still can't be re-pointed (covered by a test).

Documentation (in-admin, both tracks)

  • Manager: new category Події — creating events, registrations (incl. manual sign-up, rules, limits, what does not exist), events on the site (catalog, block, calendar, Події vs Календар змін). Updated the admin overview (dashboard, menu group, toolbar), comments/likes, pages/posts block tables, global blocks, intro.
  • Technical: new Події (events, event-enrollments) data-model article and Логіка подій (registration rules, advisory-lock capacity guard, meetingLink protection, why no embedded Zoom, Europe/Kyiv time handling, ISR/revalidation, integrations, tests). Updated model overview + cascade map, comments/likes, admin customisations (incl. AdminBar), access matrix, rate limits, search, MCP, migrations (enum gotcha + preview DB), testing, dev-cycle checklist.
  • All 411 internal /admin/docs/... links verified to resolve.

Tests

  • admin.e2e.spec.ts: dashboard covers events, events + registrations lists open, admin bar has Events/Календар змін and no create links.
  • events.int / event-enrollments.int: join field visible to admins and not to the public; admin manual registration and user/event immutability.
  • admin-docs.int: events documented in both tracks.
  • Fixed a latent bug in an existing test: the event-delete cascade test counted comments by targetId only, so it failed whenever the new event id equalled the id of a course that has comments.

Notes

  • No migration: the join field is virtual and field access is config-only.
  • Not done on purpose: draft preview for events (the event pages only serve published events, same as courses today), MCP exposure of events.
  • Locally the admin e2e needs the same seed step as CI (tsx --env-file=.env.local --env-file=.env tests/helpers/seedUser.ts).

🤖 Generated with Claude Code

- admin bar: add Events and Календар змін links, remove all + create buttons
- dashboard: events and event-registration counters, new-event quick action
- event page in admin lists its registrations (join field) so admins can see
  and manually add participants
- event-enrollments user and event are editable on create only (field-level
  update access) instead of read-only, which made manual sign-ups impossible
- docs: new manager category Події (create, registrations, on the site) and
  technical articles (data model, business logic); events added to overview,
  comments/likes, access matrix, rate limits, search, migrations, testing
- tests: admin e2e for dashboard, lists and admin bar; join/immutability
  int tests; docs coverage test; scope a cascade test to the events target
@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
learning-platform Ignored Ignored Sep 29, 2026 7:13am UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant