Skip to content

feat(payroll): live tenant-scoped trend, currency and department charts (#481) - #738

Open
woahwhattheheck wants to merge 2 commits into
Protocol-Guild:mainfrom
woahwhattheheck:gpt6/payd481-tenant-scoped-analytics-20261009
Open

woahwhattheheck wants to merge 2 commits into
Protocol-Guild:mainfrom
woahwhattheheck:gpt6/payd481-tenant-scoped-analytics-20261009

Conversation

@woahwhattheheck

Copy link
Copy Markdown

Closes #481.

GrantFox OSS / Third Campaign: original contribution and conditional reward claim

/claim #481

I am submitting this as the original @woahwhattheheck author for review and consideration under the advertised GrantFox OSS campaign. Please confirm eligible bounty award/amount and the permitted payout process after acceptance; I am affirmatively claiming authorship and any applicable approved reward, not asserting that funds have been awarded or paid.

Complete real-data chart path

  • Adds authenticated employer-only GET /api/payroll/analytics guarded by the verified JWT's organizationId (not user-provided organization IDs), using three PostgreSQL aggregation queries over settled payroll transactions in the trailing 12 calendar months.
  • Monthly trend: actual settled payment/bonus amounts for every calendar month, with a selectable single asset denomination; no cross-currency amount addition.
  • Currency distribution: counts real completed transactions per currency rather than summing USD, XLM, or other mixed units.
  • Department costs: joins employees within the same organization and sums settled amounts by employee department and selected currency; unmatched employees are "Unassigned".
  • Adds typed API client using the existing frontend auth token and no fabricated fallback/mocks.
  • Adds three responsive Recharts line/pie/bar charts, real API load/error/empty/refetch states, asset selector, theme tokens, explicit chart labels, and screen-reader data tables.
  • Connects the sidebar's existing /forecast link to the already existing Forecasting page and embeds the historical analytics underneath its predictive forecast.

Source and verification

Original branch: woahwhattheheck:gpt6/payd481-tenant-scoped-analytics-20261009, source head fce073492234c5a67be2cee45248e4040e42ebc7, exact current upstream base 171c74b454daba241bfb75f36d10a0a3a77a68e5. First-party compare: 2 new commits, 6 intended files, zero inherited fork drift, only frontend/reporting/backend payroll analytics surfaces.

I verified the actual GitHub readback, organization-filtered queries, and source import/route insertion. Local full Vite/backend builds and database integration tests were not executed; no CI-green assertion. Recommend focused cd backend && npm run build and cd frontend && npm run build plus a real organization with a completed payroll record in two currency denominations. This work neither claims sponsor acceptance nor payout receipt.

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.

Add interactive charts for payroll analytics with real data

1 participant