InReach icon indicating copy to clipboard operation
InReach copied to clipboard

feat: user management table

Open russchristina opened this issue 10 months ago • 10 comments

This PR is in draft mode until I can refine my notes. I also need to consult with Joe about an endpoint for the data so that I can remove the stubs and do some clenaup.

Pull Request type

Please check the type of change your PR introduces:

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no API changes)
  • [ ] Build-related changes
  • [ ] Documentation content changes
  • [ ] Other (please describe):

What is the current behavior?

Issue Number: IN-857

What is the new behavior?

Does this introduce a breaking change?

  • [ ] Yes
  • [ ] No

Other information

Summary by CodeRabbit

  • New Features

    • Introduced a new Management component in the Admin section for enhanced user management capabilities.
    • Added a new route /admin/management for accessing the Management page directly.
    • Enhanced user permissions to include viewAllUsers for better access control in data management.
    • Implemented new backend procedures and schemas to support user data operations effectively.
  • Documentation

    • Added comprehensive stories and documentation for the ManagementTable component to aid in development and testing.
  • Refactor

    • Updated peer dependencies in package.json to ensure compatibility with specific versions of react and react-dom.

russchristina avatar Apr 10 '24 04:04 russchristina

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

Name Status Preview Comments Updated (UTC)
inreach-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 2:49am

vercel[bot] avatar Apr 10 '24 04:04 vercel[bot]

🤖 No test run has been triggered as your Meticulous project has been deactivated (since you haven't viewed any test results in a while). Click here to reactivate.

Last updated for commit f907b42. This comment will update as new commits are pushed.

alwaysmeticulous[bot] avatar Apr 10 '24 05:04 alwaysmeticulous[bot]

📦 Next.js Bundle Analysis for @weareinreach/app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (575 KB)
/admin/management 118.17 KB 523.51 KB 91.05%

github-actions[bot] avatar Apr 10 '24 05:04 github-actions[bot]

#2295 Bundle Size — 5.65MiB (+0.14%).

f907b42(current) vs a63b8c5 dev#2281(baseline)

[!WARNING] Bundle contains 5 duplicate packages – View duplicate packages

Bundle metrics  Change 7 changes Regression 2 regressions
                 Current
#2295
     Baseline
#2281
Regression  Initial JS 3.06MiB(+0.23%) 3.05MiB
No change  Initial CSS 9.7KiB 9.7KiB
Change  Cache Invalidation 32.32% 29.67%
Change  Chunks 68(+1.49%) 67
Change  Assets 81(+1.25%) 80
Change  Modules 2021(+0.25%) 2016
Regression  Duplicate Modules 363(+0.55%) 361
Change  Duplicate Code 10.03%(+0.2%) 10.01%
No change  Packages 159 159
No change  Duplicate Packages 5 5
Bundle size by type  Change 5 changes Regression 5 regressions
                 Current
#2295
     Baseline
#2281
Regression  JS 4.41MiB (+100%) undefined
Regression  Other 1.13MiB (+100%) undefined
Regression  Fonts 94.54KiB (+100%) undefined
Regression  CSS 9.7KiB (+100%) undefined
Regression  IMG 8.57KiB (+100%) undefined

Bundle analysis reportBranch IN-857-user-managementProject dashboard


Generated by RelativeCIDocumentationReport issue

relativeci[bot] avatar Apr 11 '24 21:04 relativeci[bot]

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates focus on enhancing user management capabilities within the admin section. This includes introducing a new Management component, adding a new route /admin/management, updating permissions and API routes for user data management, defining schemas for user queries, and introducing the ManagementTable component for effective display of user management data.

Changes

File(s) Change Summary
apps/app/src/pages/admin/management.tsx, packages/ui/components/data-portal/ManagementTable.tsx, packages/ui/components/data-portal/ManagementTable.stories.tsx Introduced Management component and ManagementTable for user management display.
apps/app/src/types/nextjs-routes.d.ts, package.json Added route /admin/management and updated react and react-dom versions in peerDependencyRules.
packages/api/lib/permissions.ts, packages/api/router/user/index.ts, packages/api/router/user/query.forUserTable.handler.ts, packages/api/router/user/query.forUserTable.schema.ts, packages/api/router/user/schemas.ts Enhanced API with new permissions and procedures for user management.
packages/ui/mockData/user.ts Updated mock data handling for user management features.

These changes collectively improve the user management system, ensuring a more robust and efficient administrative experience.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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 or <!-- #coderabbitai summary --> to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title 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.

coderabbitai[bot] avatar Apr 12 '24 14:04 coderabbitai[bot]

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

kodiakhq[bot] avatar Apr 15 '24 20:04 kodiakhq[bot]

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

socket-security[bot] avatar Apr 22 '24 14:04 socket-security[bot]

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

kodiakhq[bot] avatar May 24 '24 17:05 kodiakhq[bot]

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

kodiakhq[bot] avatar May 29 '24 20:05 kodiakhq[bot]

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: unsafe +1 49.5 kB jounqin

View full report↗︎

socket-security[bot] avatar Feb 17 '25 23:02 socket-security[bot]