Skip to content

Mariano/portal#180

Merged
Marfuen merged 2 commits into
mainfrom
mariano/portal
Mar 25, 2025
Merged

Mariano/portal#180
Marfuen merged 2 commits into
mainfrom
mariano/portal

Conversation

@Marfuen

@Marfuen Marfuen commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Introduced an interactive employee dashboard featuring a completion chart that visualizes task, policy, and training progress.
    • Launched a consolidated Employees Overview page presenting key metrics and data.
  • UI & Navigation

    • Enhanced the People section with updated navigation options separating Dashboard and All Employees views.
    • Refined interface labels for improved clarity.

@vercel

vercel Bot commented Mar 25, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 9:25pm
comp-portal 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 9:25pm

@coderabbitai

coderabbitai Bot commented Mar 25, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

This update primarily refactors import paths and error handling within existing components, relocates hooks to new directories, and removes authentication logic from one page. In addition, new components and pages have been added to display employee task completion data via a dashboard. Navigation is updated through modified menu routes and locale configuration files are enhanced with new entries and standardized formatting.

Changes

File(s) Change Summary
apps/.../people/[employeeId]/components/EmployeeDetails.tsx Updated hook import path (from local to ../../all/hooks/useEmployee) and changed error check from "NOT_FOUND" to "UNEXPECTED_ERROR".
apps/.../people/all/hooks/useEmployee.ts Adjusted import paths for EmployeeDetails and AppError; removed extraneous commas in the fetchEmployeeDetails function configuration.
apps/.../sheets/invite-user-sheet.tsx Modified import path for the useEmployees hook to point to .../people/all/hooks/useEmployees.
apps/.../people/all/page.tsx Renamed exported function from PeoplePage to AllPeoplePage and removed authentication and redirection logic.
apps/.../people/dashboard/components/EmployeeCompletionChart.tsx Added new React component to render a bar chart displaying employee task completion data with memoized statistics and custom tooltips.
apps/.../people/dashboard/components/EmployeesOverview.tsx Introduced an async function that fetches employees, policies, and training videos, then renders the EmployeeCompletionChart component.
apps/.../people/dashboard/page.tsx Created new PeopleOverviewPage and generateMetadata functions to set locale parameters and generate page metadata based on internationalization data.
apps/.../people/layout.tsx Updated SecondaryMenu items by replacing the single people link with two separate links to the dashboard and all employees pages.
apps/.../components/main-menu.tsx Changed the "people" menu item route from /:organizationId/people to /:organizationId/people/dashboard.
apps/.../locales/en.ts Standardized import quote style and adjusted formatting/comments in the translations object.
apps/.../locales/features/people.ts Added new locale entries: an all property for "All Employees" and a nested dashboard object with various labels related to employee tasks and statuses.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant OP as PeopleOverviewPage
    participant EO as EmployeesOverview
    participant DF as DataFetcher
    participant EC as EmployeeCompletionChart

    U->>OP: Request People Overview (with locale)
    OP->>OP: Set static locale params
    OP->>EO: Render EmployeesOverview
    EO->>DF: Fetch employees, policies, training videos
    DF-->>EO: Return data sets
    EO->>EC: Pass data for chart rendering
    EC->>EC: Compute and render bar chart
    EC-->>U: Display employee completion chart
Loading

Poem

Hopping through lines with delight so bright,
I scurry through code in the soft moonlight.
Imports and errors now neatly refined,
A dashboard of tasks gracefully aligned.
With every leap, my heart feels light,
Celebrating changes from dawn to night! 🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a9daa0 and 0138b4e.

📒 Files selected for processing (11)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/[employeeId]/components/EmployeeDetails.tsx (2 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/all/hooks/useEmployee.ts (2 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/all/page.tsx (1 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/dashboard/components/EmployeeCompletionChart.tsx (1 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/dashboard/components/EmployeesOverview.tsx (1 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/dashboard/page.tsx (1 hunks)
  • apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/layout.tsx (1 hunks)
  • apps/app/src/components/main-menu.tsx (1 hunks)
  • apps/app/src/components/sheets/invite-user-sheet.tsx (1 hunks)
  • apps/app/src/locales/en.ts (3 hunks)
  • apps/app/src/locales/features/people.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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