Skip to content

updated the reports page#101

Merged
DRAGOR75 merged 1 commit into
masterfrom
dev-6
May 15, 2026
Merged

updated the reports page#101
DRAGOR75 merged 1 commit into
masterfrom
dev-6

Conversation

@DRAGOR75

@DRAGOR75 DRAGOR75 commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added category demand data visualization for pending nominations.
    • Added program search and pagination controls to the reports dashboard.
    • Added new "Site Demand Focus" radial chart to the planning section.
  • Bug Fixes

    • Resolved Recharts development warnings with improved chart rendering.
  • Improvements

    • Updated navigation link to the Training Cohorts page.
    • Removed result limit on top programs query for expanded visibility.
    • Enhanced dashboard with empty state messaging for program searches.
    • Updated footer branding text.

Review Change Stack

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
templtrainingportal Ready Ready Preview, Comment May 15, 2026 9:26am

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f9216050-88cd-481d-a639-96c6d7f82709

📥 Commits

Reviewing files that changed from the base of the PR and between fd9fef3 and e507f18.

📒 Files selected for processing (4)
  • app/actions/bulk-upload.ts
  • app/actions/reports.ts
  • app/admin/page.tsx
  • components/admin/ReportsDashboard.tsx

📝 Walkthrough

Walkthrough

This PR enhances the admin reporting dashboard and backend reports data. It adds category demand aggregation to the reports API, updates navigation links, implements pagination and chart stability improvements in the dashboard, adds planning section visualizations, and introduces search filtering with pagination for programs.

Changes

Admin Dashboard and Reports Enhancements

Layer / File(s) Summary
Reports data layer with category demand
app/actions/reports.ts
getTniReportData adds categoryDemand aggregation grouped by program category for pending nominations (optionally filtered by site), removes the take: 15 limit from topPrograms, and returns the mapped categoryDemand in the result object.
Admin page navigation and footer updates
app/admin/page.tsx
Card 5 "Training Cohorts" href changes from /wip to /admin/cohorts. Footer copyright text is updated to include "infra" alongside "Thriveni Earthmovers".
Reports Dashboard chart rendering and mount-gating setup
components/admin/ReportsDashboard.tsx
Imports extended with useEffect and new Recharts chart types. Pagination state (currentPage, itemsPerPage, filters) and isMounted flag added. useEffect suppresses Recharts dev warning by temporarily overriding console.error and delays chart rendering until after mount. ResponsiveContainer elements gain minWidth/minHeight and debounce options.
Reports Dashboard planning section chart updates
components/admin/ReportsDashboard.tsx
"Demand by Employee Grade" rendered as vertical bar chart. New radial bar "Site Demand Radial Focus" chart added with centered label. "Site Distribution" pie chart updated with mount-gating and sizing adjustments. Category demand treemap and departmental demand charts made mount-gated with sizing/debounce refinements.
Reports Dashboard program search and pagination
components/admin/ReportsDashboard.tsx
Program list filtered by searchTerm via derived filteredPrograms. Search input uses new handleSearchChange handler that resets pagination to page 1. Results paginated via paginatedPrograms with prev/next controls and "Page X of Y" indicator. "No programs found" empty state added.

Bulk Upload Formatting Cleanup

Layer / File(s) Summary
Bulk upload function formatting
app/actions/bulk-upload.ts
processEmployeeUpload whitespace and blank-line formatting adjusted around programMap annotation, TNI status mapping, program parsing, category selection, and success count increment. No logic changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A dashboard blooms with charts anew,
Where radial bars and treemaps grew,
With search and pages, clean and bright,
The reports now render without a fright—
hops gleefully 📊✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-6

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DRAGOR75 DRAGOR75 merged commit 3dff3c3 into master May 15, 2026
2 of 4 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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