documenso icon indicating copy to clipboard operation
documenso copied to clipboard

feat: add user conversion count to admin panel

Open ephraimduncan opened this issue 1 year ago • 4 comments

Description

Display the count of users who signed up after signing at least one document in the admin panel

CleanShot 2024-05-09 at 21 44 59@2x

Changes Made

  • Created a new function getSignerConversion to retrieve the count of converted recipients from the database and added a new metric card in the admin stats page to display the count

Checklist

  • [x] I have tested these changes locally and they work as expected.
  • [ ] I have added/updated tests that prove the effectiveness of these changes.
  • [ ] I have updated the documentation to reflect these changes, if applicable.
  • [x] I have followed the project's coding style guidelines.
  • [ ] I have addressed the code review feedback from the previous submission, if applicable.

ephraimduncan avatar May 07 '24 11:05 ephraimduncan

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

Name Status Preview Comments Updated (UTC)
stg-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 3:57am
stg-docs ❌ Failed (Inspect) Jul 5, 2024 3:57am
stg-marketing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 3:57am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
prd-app ⬜️ Ignored (Inspect) Jul 5, 2024 3:57am
prd-marketing ⬜️ Ignored (Inspect) Jul 5, 2024 3:57am

vercel[bot] avatar May 07 '24 11:05 vercel[bot]

Walkthrough

This update primarily focuses on enhancing the admin dashboard in the web application by refining icon usage and introducing new functionalities for tracking and displaying signer conversion metrics. Specifically, it replaces several icons with more suitable alternatives and introduces new components and functions for visualizing signer conversion data using charts. The backend now includes functions to retrieve and handle this data, ensuring a more data-driven, visually appealing user interface.

Changes

File/Directory Path Change Summary
apps/web/src/app/(dashboard)/admin/nav.tsx Replaced User2 icon with Users icon.
apps/web/src/app/(dashboard)/admin/stats/page.tsx Added FileCog, replaced UserPlus2 with UserPlus, added Users icon, and integrated getSignerConversionMonthly for data retrieval and new chart components.
apps/web/src/app/(dashboard)/admin/stats/signer-conversion-chart.tsx Introduced SignerConversionChart component rendering signer conversion data.
apps/web/src/components/(dashboard)/metric-card/metric-card.tsx Updated styling for h3 element by adding mb-2 class.
packages/lib/server-only/admin/get-recipients-stats.ts Enhanced getRecipientsStats function to include signer conversion data from getSignerConversion.
packages/lib/server-only/user/get-signer-conversion.ts Introduced new functions to query overall and monthly signer conversion data using Prisma.

Poem

In dashboards bright and grand, New icons take their stand. Charts that shine so clear, Conversion data near. With metrics now displayed, Admins won't be swayed. In code, we've found delight, Making the future bright. 🌟🐇


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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 May 07 '24 11:05 coderabbitai[bot]

🚨 @ephraimduncan has 4 pull requests awaiting review. Please consider reviewing them when possible. 🚨

github-actions[bot] avatar May 07 '24 11:05 github-actions[bot]

🚨 @ephraimduncan has 4 pull requests awaiting review. Please consider reviewing them when possible. 🚨

github-actions[bot] avatar May 09 '24 21:05 github-actions[bot]

Want to take a crack at migrating the queryRaw to Kysely? We should also include something for the conversion query to only include those who received a document within the last 30 days or so which would imply correlation.

Mythie avatar Jul 02 '24 02:07 Mythie

@Mythie I took a shot at Kysely. Let me know what you think.

ephraimduncan avatar Jul 03 '24 14:07 ephraimduncan