-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(signature-collection): Candidacy upload paper signature #16079
Conversation
WalkthroughThe changes introduce a new GraphQL input type for uploading paper signatures and enhance the functionality of the Changes
Possibly related PRs
Suggested reviewers
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (1)
163-176
: Excellent work on implementing the new mutation!The
signatureCollectionUploadPaperSignature
mutation follows the existing patterns and conventions in the resolver. The access control guards and audit decorator are correctly applied to ensure security and accountability.A few additional suggestions:
- Consider adding a brief documentation comment above the method to describe its purpose and any constraints or side effects.
- Verify that appropriate unit tests have been added to cover this new functionality.
- Ensure that the corresponding changes have been made in the
SignatureCollectionService
to handle the actual processing logic.Overall, the implementation looks solid and well-integrated with the existing codebase.
libs/clients/signature-collection/src/lib/signature-collection.service.ts (1)
271-297
: LGTM! The new function adds paper signature upload capability.The
candidacyUploadPaperSignature
function is implemented correctly and enhances the service's functionality by allowing the upload of paper signatures for candidacies. The function adheres to the existing coding style and practices used in the file, making it consistent with the codebase.
- Confirm that the function adheres to the reusability of components and hooks across different NextJS apps, TypeScript usage for defining props and exporting types, and effective tree-shaking and bundling practices.
Consider the following suggestions to further improve the function:
- Add error handling to gracefully handle API failures or invalid responses.
- Include unit tests to validate the function behavior and ensure its reliability.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- libs/api/domains/signature-collection/src/lib/dto/uploadPaperSignature.input.ts (1 hunks)
- libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (2 hunks)
- libs/api/domains/signature-collection/src/lib/signatureCollection.service.ts (2 hunks)
- libs/clients/signature-collection/src/lib/signature-collection.service.ts (1 hunks)
Additional context used
Path-based instructions (4)
libs/api/domains/signature-collection/src/lib/dto/uploadPaperSignature.input.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/signatureCollection.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/clients/signature-collection/src/lib/signature-collection.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (4)
libs/api/domains/signature-collection/src/lib/dto/uploadPaperSignature.input.ts (1)
5-17
: LGTM!The
SignatureCollectionUploadPaperSignatureInput
class is well-structured and follows best practices for defining a GraphQL input type. The use of decorators from theclass-validator
library ensures that the incoming data is validated and adheres to the expected format.The class is also reusable across different NextJS apps, as it is defined in the
libs
directory. This promotes code reuse and maintainability.The class effectively utilizes TypeScript for defining props and exporting types, which enhances type safety and improves the developer experience.
Overall, the class provides a clear and validated structure for handling paper signature uploads, making it a valuable addition to the signature collection API.
libs/api/domains/signature-collection/src/lib/signatureCollection.service.ts (2)
19-20
: LGTM!The imports for the new input types are correctly referenced and placed. The naming convention is also followed.
135-144
: Excellent addition!The new method
candidacyUploadPaperSignature
is implemented correctly and enhances the service's capabilities. The method signature and return type are properly defined, and the implementation follows the existing coding style and conventions.Please confirm that the new method adheres to the following:
- Reusability of the method across different NextJS apps.
- TypeScript usage for defining the input type and return type.
libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (1)
34-35
: LGTM!The new import statements follow the existing naming convention and are likely needed to support the new functionality.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16079 +/- ##
==========================================
+ Coverage 36.66% 36.69% +0.03%
==========================================
Files 6748 6736 -12
Lines 138720 138464 -256
Branches 39403 39389 -14
==========================================
- Hits 50862 50815 -47
+ Misses 87858 87649 -209
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 37 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 5 Total Test Services: 0 Failed, 5 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (2) |
...
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
listId
,nationalId
, andpageNumber
.Enhancements