Skip to content

feat: daily drawings UI (#2865) - #2877

Merged
jung-thomas merged 9 commits into
DEVfrom
worktree-drawings-ui-2865
Oct 21, 2026
Merged

jung-thomas merged 9 commits into
DEVfrom
worktree-drawings-ui-2865

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Closes #2865.

A standalone, projector-facing UI for running daily prize drawings at events. An operator picks an event, hits Draw, and one random winner is revealed (name + email) with the Kasimir mascot.

What's included

  • DrawingService (srv/drawing-service.cds + .js) at /drawings, @requires:'Admin' — three OData functions:
    • listEvents() — events with ≥1 scanned prize claim, newest-first.
    • pool(eventId) — {eventId, eligibleCount}, no PII.
    • draw(eventId) — one random winner {winner:{displayName,email}|null, eligibleCount}; random selection + PII resolution are server-side, the browser never receives the full roster.
  • Vue 3 display app app/display-app-drawings/ served at /drawings-ui/ (sibling to display-app).
  • Deploy wiring — approuter routes for /drawings-ui/ (static) and /drawings/ (srv-api), MTA builder block.
  • Docs — testing-endpoints.md updated.

Eligibility & privacy

  • Pool = distinct users with PrizeRecords.status='CLAIMED' for the event, excluding anonymized users (displayName='ANONYMIZED').
  • Winner PII (name/email) is gated on the Admin scope (not DisplayApp) in all three places: CAP @requires, the UI route, and the backend route.
  • Winner renders gracefully when email is null.
  • Each draw is independent over the full pool (no prior-winner exclusion, no persistence) — per product decision.

Tests

  • test/drawing-service.test.js — 9/9 passing: Admin-gating (403), newest-first ordering, distinct+anonymized-excluded pool count, empty pool, 404 for unknown event on both pool and draw, null-email winner.
  • Vue app builds clean.

Known follow-up

  • app/display-app-drawings/public/kasimir-tuxedo.png is a placeholder — the real tuxedo-Kasimir image needs to be dropped in (it was pasted into the authoring session; the bytes weren't reachable to commit from here).

Built via spec → plan → subagent-driven implementation; design at docs/superpowers/specs/2026-10-21-daily-drawings-ui-design.md, plan at docs/superpowers/plans/2026-10-21-daily-drawings-ui.md.

@jung-thomas
jung-thomas merged commit 8d86130 into DEV Oct 21, 2026
7 checks passed
@jung-thomas
jung-thomas deleted the worktree-drawings-ui-2865 branch October 21, 2026 19:29
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