-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix(j-s): Only display cases with certain ruling decisions as up for review #15218
Conversation
WalkthroughThe changes primarily focus on enhancing case filtering and display logic in the judicial system web application. Specifically, conditions for filtering cases based on indictment ruling decisions were updated, and the appeal expiration information visibility condition was modified to consider both the defender's role and if the user is the indictment reviewer. Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Datadog ReportAll test runs ✅ 101 Total Test Services: 0 Failed, 99 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (4) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15218 +/- ##
==========================================
- Coverage 37.10% 37.10% -0.01%
==========================================
Files 6448 6448
Lines 131446 131457 +11
Branches 37566 37570 +4
==========================================
+ Hits 48775 48776 +1
- Misses 82671 82681 +10 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (2 hunks)
Files not reviewed due to errors (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (Error: Server error. Please try again later.)
Additional context used
Path-based instructions (1)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (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."
Learnings (1)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (1)
User: oddsson PR: island-is/island.is#14673 File: apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesForReview.tsx:79-79 Timestamp: 2024-05-06T23:16:04.892Z Learning: The implementation of `mapIndictmentCaseStateToTagVariant` in `TagCaseState.tsx`, which maps only `CaseState.ACCEPTED` to a specific tag and defaults others to an "unknown" status, is intentional as per the application's requirements.
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.
One quick question
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx
Outdated
Show resolved
Hide resolved
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (2 hunks)
Files not reviewed due to errors (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (no review received)
Additional context used
Path-based instructions (1)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (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."
Learnings (1)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (1)
User: oddsson PR: island-is/island.is#14673 File: apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesForReview.tsx:79-79 Timestamp: 2024-05-06T23:16:04.892Z Learning: The implementation of `mapIndictmentCaseStateToTagVariant` in `TagCaseState.tsx`, which maps only `CaseState.ACCEPTED` to a specific tag and defaults others to an "unknown" status, is intentional as per the application's requirements.
GitHub Check: linting (judicial-system-web)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx
[warning] 15-15:
'IndictmentDecision' is defined but never used. Allowed unused vars must match /^_[a-zA-Z0-9]*$/u
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (2 hunks)
Files not summarized due to errors (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx: Error: Server error. Please try again later.
Additional context used
Path-based instructions (1)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (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 not posted (2)
apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (2)
12-15
: Imports are correctly added forCaseIndictmentRulingDecision
andCaseListEntry
.
38-43
: The updated filtering logic correctly implements the feature to only display cases with certain rulings as up for review. The conditions are well-structured and follow the intended logic described in the PR.
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- apps/judicial-system/web/src/routes/Shared/IndictmentOverview/IndictmentOverview.tsx (1 hunks)
Additional context used
Path-based instructions (1)
apps/judicial-system/web/src/routes/Shared/IndictmentOverview/IndictmentOverview.tsx (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."
Learnings (1)
apps/judicial-system/web/src/routes/Shared/IndictmentOverview/IndictmentOverview.tsx (1)
User: unakb PR: island-is/island.is#14922 File: apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx:43-49 Timestamp: 2024-05-27T10:53:40.687Z Learning: The `getAppealExpirationInfo` function in `DefendantInfo.tsx` correctly uses `today < expiryDate` to determine if the current date is before the appeal expiration date.
Additional comments not posted (2)
apps/judicial-system/web/src/routes/Shared/IndictmentOverview/IndictmentOverview.tsx (2)
96-99
: The logic for displaying appeal expiration information is correctly updated to include checks for both theDEFENDER
role and whether the user is the indictment reviewer. This ensures that the right users see the appeal expiration information, aligning with the PR's objectives.
Line range hint
1-1
: The file structure and use of TypeScript in this component are in line with NextJS best practices. The explicit typing and efficient use of React hooks contribute to both readability and performance.
Skrifstofa Ríkissaksóknara á bara að fá mál til yfirlestrar ef þeim líkur með dómi eða viðurlagaákvörðun
What
Only display cases that have a ruling or fine as up for review by the public prosecutors office
Checklist:
Summary by CodeRabbit
New Features
indictmentRulingDecision
.Improvements