-
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
chore(j-s): add gender to custody notice #17370
Conversation
WalkthroughThe pull request introduces modifications to the custody notice PDF generation process in the judicial system backend. The changes focus on enhancing the PDF document's detail by adding the defendant's residence and gender information. A new import for formatting gender is introduced, and the PDF generation logic is updated to include more comprehensive personal details. The changes improve the clarity of the generated custody notice while maintaining the existing PDF generation structure. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 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
🧹 Nitpick comments (1)
apps/judicial-system/backend/src/app/formatters/custodyNoticePdf.ts (1)
84-91
: Consider using translations for the fallback text.The fallback text ("Ekki skráð") could be wrapped with the translation system (via
formatMessage
) for consistency with other localized strings. This ensures a unified user experience across all localized labels.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/judicial-system/backend/src/app/formatters/custodyNoticePdf.ts
(2 hunks)apps/judicial-system/backend/src/app/messages/pdfCustodyNotice.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- apps/judicial-system/backend/src/app/messages/pdfCustodyNotice.ts
🧰 Additional context used
📓 Path-based instructions (1)
apps/judicial-system/backend/src/app/formatters/custodyNoticePdf.ts (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (1)
apps/judicial-system/backend/src/app/formatters/custodyNoticePdf.ts (1)
93-101
: Ensure coverage with tests for the newly added gender field.
Including a new field for gender is helpful; however, please confirm that the updated PDF generation logic is covered by unit or integration tests. This will ensure that the gender fallback ("Ekki skráð") and the formatted gender from formatGender
function are validated to work as expected.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17370 +/- ##
==========================================
+ Coverage 35.67% 35.68% +0.01%
==========================================
Files 6932 6930 -2
Lines 148870 148752 -118
Branches 42533 42500 -33
==========================================
- Hits 53109 53083 -26
+ Misses 95761 95669 -92
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 20 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 21092 Passed, 0 Skipped, 18m 28.68s Total Time |
What
Why
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation