feat(dashboard): "This Month" contributions tab + restyled sort icons#31
Merged
Conversation
…cons Add a fifth dashboard tab listing every contribution made in the current calendar month (IST) by active members, in a #/Person/Contribution/Date/ Transaction ID table built on the shared PrDataTable (search + export + footer total). - dashboard.ts: getCurrentMonthContributions(monthIso) cached read; month key is passed in (not derived from the clock) since Cache Components forbids reading the clock inside a 'use cache' scope. Filters to transaction_type='contribution' within the month and to active members. - data-table.tsx: replace PrimeReact's default sort glyph with a stacked rounded-chevron indicator via the supported sortIcon render prop (the active direction highlights in brand blue). Applies app-wide. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
contributionmade in the current calendar month (IST) by active members, in a#· Person Name · Contribution · Date · Transaction ID table.Details
lib/actions/dashboard.ts— new cached readgetCurrentMonthContributions(monthIso). Readsdashboard_transactionsfiltered totransaction_type='contribution'within the month range, then restricts to members withstatus='active'. The month key is passed in (not derived from the clock) because Cache Components forbids reading the clock inside a'use cache'scope; the cache key already keys on the month.dashboard/current-month-contributions-table.tsx— new client table on the sharedPrDataTable(PrimeReact): sortable columns, global search, CSV/export menu, footer total. The#column uses the liverowIndexso the serial number tracks the sorted/filtered order.dashboard/dashboard-tabs.tsx+dashboard/page.tsx— register thethismonthtab (lazy-mounted, not year-scoped) and wire in the data + header.components/ui/pr/data-table.tsx— replace PrimeReact's default sort glyph via the supportedsortIconrender prop. Done in the shared wrapper, so every table in the app gets the same indicator.Testing
npm run lint— clean (only a pre-existing unrelated warning)npm run build— compiles successfully🤖 Generated with Claude Code