Skip to content

feat: dashboard analytics charts, live check-in counter, geo heatmap & newsletter form#520

Merged
BigBen-7 merged 1 commit into
Lead-Studios:mainfrom
RennyThompson:feat/issues-462-463-464-469
Jun 30, 2026
Merged

feat: dashboard analytics charts, live check-in counter, geo heatmap & newsletter form#520
BigBen-7 merged 1 commit into
Lead-Studios:mainfrom
RennyThompson:feat/issues-462-463-464-469

Conversation

@RennyThompson

Copy link
Copy Markdown
Contributor

Summary

Resolves all four open issues assigned to me in one cohesive feature branch.

Changes

  • useOrganizerAnalytics hook — rewritten with the full OrganizerAnalytics type (revenue, performance, totalEarned, payoutsQueued, nextSettlementDays, checkInsLive, doorsOpenInMinutes, totalEvents, events, ticketBreakdown, demographics).

  • FE-xxx: feat: add newsletter signup form that actually submits — POST /api/newsletter/subscribe #469 — NewsletterForm — already complete: submits POST /api/newsletter/subscribe with loading state, success/error inline messages, and Zod email validation. No further changes needed.

  • FE-xxx: feat: add real-time check-in counter with WebSocket on dashboard #464 — LiveCheckInCard (src/components/dashboard/LiveCheckInCard.tsx) — new card shown when checkInsLive === true. Displays live check-in count with a pulsing green dot and active event name; falls back to "No active events — check-in counter paused". Polls via useCheckInCounter every 10 seconds.

  • FE-xxx: feat: add revenue breakdown by ticket type chart on dashboard #463 — RevenueByTicketTypeChart (src/components/dashboard/charts/RevenueByTicketTypeChart.tsx) — PieChart keyed on revenue. Tooltip: "VIP: 450,000 (62%)". Legend shows type, revenue, and share. Same colour palette as TicketTypeChart. Wired into dashboard below ticket breakdown.

  • FE-xxx: feat: add geographic heatmap of ticket purchasers on the analytics dashboard #462 — Geographic heatmap (src/components/dashboard/GeoHeatmap.tsx) — choropleth world map via react-simple-maps@3.0.0. Countries coloured light to dark blue by percentage. Hover tooltip: "{country}: {count} tickets ({percentage}%)". DemographicsSection falls back to the existing text table when region data is absent.

  • Dashboard fix — removed duplicate eventImages/eventImgs variable declarations that caused a TypeScript syntax error.

Files changed

  • src/hooks/useOrganizerAnalytics.ts — full type rewrite
  • src/hooks/useCheckInCounter.ts — poll interval 15s to 10s
  • src/components/dashboard/LiveCheckInCard.tsx — new
  • src/components/dashboard/charts/RevenueByTicketTypeChart.tsx — new
  • src/components/dashboard/GeoHeatmap.tsx — new
  • src/components/dashboard/DemographicsSection.tsx — adds choropleth map
  • src/app/(protected)/dashboard/page.tsx — wires new components, fixes duplicate vars
  • package.json / package-lock.json — adds react-simple-maps@3.0.0

Closes

Closes #469
Closes #464
Closes #463
Closes #462

Lead-Studios#469 — dashboard analytics & newsletter

- fix(hook): rewrite useOrganizerAnalytics with full OrganizerAnalytics type
  (revenue, performance, totalEarned, payoutsQueued, nextSettlementDays,
   checkInsLive, doorsOpenInMinutes, totalEvents, events, ticketBreakdown,
   demographics)
- fix(hook): update useCheckInCounter poll interval to 10s per issue Lead-Studios#464
- feat(Lead-Studios#469): NewsletterForm already submits POST /api/newsletter/subscribe
  with loading state, success/error messages, and email validation (no-op)
- feat(Lead-Studios#464): add LiveCheckInCard component — live check-in counter with
  pulsing green dot, event name, 10s polling via useCheckInCounter
- feat(Lead-Studios#463): add RevenueByTicketTypeChart — PieChart by revenue with
  tooltip showing type, revenue and percentage share
- feat(Lead-Studios#462): add GeoHeatmap choropleth via react-simple-maps; update
  DemographicsSection to render map when region data exists, falls back
  to text table when region data is missing
- fix(dashboard): remove duplicate eventImages/eventImgs variable declarations
- chore: install react-simple-maps@3.0.0

Closes Lead-Studios#469
Closes Lead-Studios#464
Closes Lead-Studios#463
Closes Lead-Studios#462
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@RennyThompson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@BigBen-7
BigBen-7 merged commit b6d507d into Lead-Studios:main Jun 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants