Skip to content

Added Acheivements#102

Merged
f3-jolt merged 3 commits intostagingfrom
area42
Mar 30, 2026
Merged

Added Acheivements#102
f3-jolt merged 3 commits intostagingfrom
area42

Conversation

@f3-jolt
Copy link
Copy Markdown
Collaborator

@f3-jolt f3-jolt commented Mar 30, 2026

Summary

  • Adds an AchievementsCard to region pages showing PAX approaching post/Q milestones and upcoming FNG anniversaries within 14 days
  • Adds RegionAchievementPax type and a BigQuery CTE pipeline in getPageData that computes next milestones (25/50/100/200/.../1000) for both region and nation scope, and anniversary dates using leap-year-safe DATE_ADD logic
  • Wires the new data through the region loader, page, and RegionalPageWrapper; layout rearranged so Achievements sits beside the Kotters + Upcoming column

What changed

  • src/lib/types.ts — new RegionAchievementPax interface; RegionData extended with achievements
  • src/lib/bq/regions.ts — new achievement_* CTEs appended to getPageData; achievements column added to SELECT and return value
  • src/components/region/AchievementsCard.tsx — new client component with Region/Nation scope toggle and All/Posts/Qs/Anniversaries filter; sorted by urgency (days/count remaining)
  • src/components/region/PageWrapper.tsx — imports and renders AchievementsCard; Kotters + Upcoming events stacked in a nested column alongside it
  • src/app/stats/region/[regionId]/loader.ts and page.tsx — pass achievements through the data pipeline

Test plan

  • Visit a region page and confirm the Achievements card renders with real data
  • Toggle Region ↔ Nation scope and verify counts/milestones change accordingly
  • Filter by Posts / Qs / Anniversaries and confirm the list filters correctly
  • Verify PAX with an anniversary in the next 14 days appear with correct year label and days-until count
  • Confirm PAX with fewer than 25 region posts or 10 total posts are excluded
  • Check that the Kotters and Upcoming Events cards are still visible and correctly stacked

@f3-jolt f3-jolt changed the title Area42 Added Acheivements Mar 30, 2026
@f3-jolt f3-jolt merged commit dc581b0 into staging Mar 30, 2026
6 checks passed
@f3-jolt f3-jolt deleted the area42 branch March 30, 2026 21:40
@f3-jolt f3-jolt mentioned this pull request Apr 2, 2026
@F3-Skippy
Copy link
Copy Markdown

image001 (2)

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.

2 participants