-
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): Table for reviewed cases #14778
Conversation
WalkthroughThe recent updates introduce a new field, 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 (
|
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 (7)
- apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/case/interceptors/caseList.interceptor.ts (1 hunks)
- apps/judicial-system/web/messages/Core/tables.ts (1 hunks)
- apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (3 hunks)
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts (1 hunks)
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx (1 hunks)
- apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql (1 hunks)
Files skipped from review due to trivial changes (1)
- apps/judicial-system/web/messages/Core/tables.ts
Additional Context Used
Path-based Instructions (6)
apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.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/web/src/routes/Shared/Cases/cases.graphql (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/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."
apps/judicial-system/backend/src/app/modules/case/interceptors/caseList.interceptor.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/api/src/app/modules/case-list/models/caseList.model.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/web/src/routes/PublicProsecutor/Tables/CasesReviewed.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 (2)
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.
apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.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.
Additional comments not posted (7)
apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts (1)
3-32
: All message definitions are correctly structured and contain appropriate content for internationalization.apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql (1)
90-90
: The addition ofindictmentReviewDecision
to the GraphQL query is appropriate and aligns with the PR's objectives to enhance case management features.apps/judicial-system/web/src/routes/PublicProsecutor/Cases/PublicProsecutorCases.tsx (2)
29-47
: The logic to categorize cases based onindictmentReviewDecision
is implemented efficiently usingreduce
. This approach is both concise and effective for the intended functionality.
67-69
: The rendering ofCasesForReview
andCasesReviewComplete
components based on the categorized cases is correctly implemented. This ensures that cases are displayed appropriately based on their review status.apps/judicial-system/backend/src/app/modules/case/interceptors/caseList.interceptor.ts (1)
60-60
: The inclusion ofindictmentReviewDecision
in the response object of the interceptor is correctly implemented. It ensures that the frontend receives necessary data without exposing sensitive information.apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts (1)
112-113
: The addition ofindictmentReviewDecision
to theCaseListEntry
model is correctly annotated with GraphQL decorators, ensuring it integrates well with the API's schema.apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx (1)
30-104
: TheCasesReviewed
component is well-implemented with clear separation of concerns and efficient use of React patterns likeuseMemo
for decision mapping. The use ofTable
andTableInfoContainer
components enhances the modularity and maintainability of the code.
…land-is/island.is into j-s/reviewed-indictment-cases
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14778 +/- ##
==========================================
- Coverage 36.94% 36.94% -0.01%
==========================================
Files 6312 6312
Lines 128511 128505 -6
Branches 36657 36656 -1
==========================================
- Hits 47475 47471 -4
+ Misses 81036 81034 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 97 Total Test Services: 0 Failed, 95 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (3) |
apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts
Outdated
Show resolved
Hide resolved
apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.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.
Some minor nitpicks
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/Tables/CasesReviewed.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx
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 (4)
- apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts (2 hunks)
- apps/judicial-system/web/messages/Core/tables.ts (1 hunks)
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts (1 hunks)
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts
- apps/judicial-system/web/messages/Core/tables.ts
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts
- apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx
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/api/src/app/modules/case-list/models/caseList.model.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts
* feat(j-s): Table for reviewed cases * Update CasesReviewed.tsx * cleanup * chore: nx format:write update dirty files --------- Co-authored-by: andes-it <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Ríksak - Skrifstofa - Tafla um yfirlesin mál
What
Display table of reviewed cases for public prosecutor staff
Checklist:
Summary by CodeRabbit
New Features
indictmentReviewDecision
to the case list entries.CasesReviewed
for public prosecutors to view reviewed cases.Enhancements
CasesReviewed
component.