-
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(j-s): Upload Additional Files to Court #17152
Conversation
…nt cases to court
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. WalkthroughThe pull request introduces significant modifications to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 (1)
apps/judicial-system/backend/src/app/modules/case/case.service.ts (1)
778-787
: Refactor to eliminate code duplication incaseFilesCategories
assignmentThe arrays assigned to
caseFilesCategories
in both branches of the conditional are almost identical, differing only in the inclusion ofCaseFileCategory.INDICTMENT
. Consider refactoring to define the common categories once and conditionally addCaseFileCategory.INDICTMENT
when appropriate.Apply this diff to refactor the code:
-const caseFilesCategories = isTrafficViolationCase(theCase) - ? [ - CaseFileCategory.CRIMINAL_RECORD, - CaseFileCategory.COST_BREAKDOWN, - CaseFileCategory.CASE_FILE, - CaseFileCategory.PROSECUTOR_CASE_FILE, - CaseFileCategory.DEFENDANT_CASE_FILE, - ] - : [ - CaseFileCategory.INDICTMENT, - CaseFileCategory.CRIMINAL_RECORD, - CaseFileCategory.COST_BREAKDOWN, - CaseFileCategory.CASE_FILE, - CaseFileCategory.PROSECUTOR_CASE_FILE, - CaseFileCategory.DEFENDANT_CASE_FILE, - ] +const baseCaseFilesCategories = [ + CaseFileCategory.CRIMINAL_RECORD, + CaseFileCategory.COST_BREAKDOWN, + CaseFileCategory.CASE_FILE, + CaseFileCategory.PROSECUTOR_CASE_FILE, + CaseFileCategory.DEFENDANT_CASE_FILE, +] +const caseFilesCategories = isTrafficViolationCase(theCase) + ? baseCaseFilesCategories + : [CaseFileCategory.INDICTMENT, ...baseCaseFilesCategories]
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
apps/judicial-system/backend/src/app/modules/case/case.service.ts
(1 hunks)apps/judicial-system/backend/src/app/modules/file/file.service.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/judicial-system/backend/src/app/modules/file/file.service.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."
apps/judicial-system/backend/src/app/modules/case/case.service.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 (2)
apps/judicial-system/backend/src/app/modules/file/file.service.ts (2)
155-156
: Correct mapping of new case file categories
The new CaseFileCategory.PROSECUTOR_CASE_FILE
and CaseFileCategory.DEFENDANT_CASE_FILE
are appropriately mapped to CourtDocumentFolder.CASE_DOCUMENTS
in the getCourtDocumentFolder
method.
393-408
: Correct handling of new case file categories in message queue
The code correctly adds logic to send messages to the queue when new PROSECUTOR_CASE_FILE
and DEFENDANT_CASE_FILE
are created for indictment cases.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17152 +/- ##
=======================================
Coverage 35.75% 35.75%
=======================================
Files 6925 6925
Lines 147605 147610 +5
Branches 42024 42030 +6
=======================================
+ Hits 52772 52775 +3
- Misses 94833 94835 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 21278 Passed, 0 Skipped, 22m 20.6s Total Time |
Upload Additional Files to Court
Bæta við nýjum file category-um til að senda á héraðsdóm (gögn sem eru send inn)
What
Why
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes