-
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 subpoena type to case table #15167
Conversation
WalkthroughThe recent updates introduce a new property Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebApp
participant API
participant Backend
participant Database
User->>WebApp: Update case with subpoenaType
WebApp->>API: Send UpdateCase request with subpoenaType
API->>Backend: Forward UpdateCase request
Backend->>Database: Update case record with subpoenaType
Database->>Backend: Confirmation of update
Backend->>API: Confirmation of update
API->>WebApp: Confirmation of update
WebApp->>User: Update successful
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 (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15167 +/- ##
========================================
Coverage 37.01% 37.02%
========================================
Files 6423 6431 +8
Lines 131041 131161 +120
Branches 37523 37484 -39
========================================
+ Hits 48511 48566 +55
- Misses 82530 82595 +65
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 60 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: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (10)
- apps/judicial-system/api/src/app/modules/case/dto/updateCase.input.ts (2 hunks)
- apps/judicial-system/api/src/app/modules/case/models/case.model.ts (3 hunks)
- apps/judicial-system/backend/migrations/20240610131959-update-case.js (1 hunks)
- apps/judicial-system/backend/src/app/modules/case/dto/updateCase.dto.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/case/models/case.model.ts (2 hunks)
- apps/judicial-system/web/src/components/FormProvider/case.graphql (1 hunks)
- apps/judicial-system/web/src/utils/hooks/useCase/updateCase.graphql (1 hunks)
- libs/judicial-system/types/src/index.ts (1 hunks)
- libs/judicial-system/types/src/lib/case.ts (1 hunks)
Files skipped from review due to trivial changes (2)
- apps/judicial-system/api/src/app/modules/case/models/case.model.ts
- libs/judicial-system/types/src/lib/case.ts
Additional context used
Path-based instructions (8)
apps/judicial-system/backend/migrations/20240610131959-update-case.js (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."
libs/judicial-system/types/src/index.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."
apps/judicial-system/web/src/utils/hooks/useCase/updateCase.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/components/FormProvider/case.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/backend/src/app/modules/case/guards/rolesRules.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/dto/updateCase.input.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/dto/updateCase.dto.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/models/case.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."
Additional comments not posted (7)
libs/judicial-system/types/src/index.ts (1)
76-76
: The addition ofSubpoenaType
to the exports is correctly implemented.apps/judicial-system/web/src/utils/hooks/useCase/updateCase.graphql (1)
223-223
: The addition ofsubpoenaType
to the GraphQL mutation is correctly implemented.apps/judicial-system/web/src/components/FormProvider/case.graphql (1)
267-267
: The addition ofsubpoenaType
to the GraphQL query is correctly implemented.apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (1)
95-95
: Addition ofsubpoenaType
todistrictCourtFields
looks good.#!/bin/bash # Description: Verify that the front-end correctly handles the new `subpoenaType` field for district court roles. # Test: Search for the usage of `districtCourtFields` in front-end components. Expect: Proper handling of `subpoenaType`. rg --type tsx "districtCourtFields"apps/judicial-system/api/src/app/modules/case/dto/updateCase.input.ts (1)
500-503
: Addition ofsubpoenaType
field toUpdateCaseInput
is implemented correctly.apps/judicial-system/backend/src/app/modules/case/dto/updateCase.dto.ts (1)
507-510
: Addition ofsubpoenaType
field toUpdateCaseDto
is implemented correctly.apps/judicial-system/backend/src/app/modules/case/models/case.model.ts (1)
1038-1047
: The implementation of thesubpoenaType
property looks correct and follows the established patterns in the file. It's well-documented and uses the ENUM type appropriately.
Datadog ReportAll test runs ✅ 8 Total Test Services: 0 Failed, 8 Passed Test Services
|
…bpoena-type-to-db
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 (2)
- apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (1 hunks)
- libs/judicial-system/types/src/lib/case.ts (1 hunks)
Additional context used
Path-based instructions (2)
apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.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."
libs/judicial-system/types/src/lib/case.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."
Biome
libs/judicial-system/types/src/lib/case.ts
[error] 108-108: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 109-109: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 110-110: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 111-111: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 112-112: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 113-113: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 114-114: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 115-115: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 119-119: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 120-120: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 121-121: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 122-122: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 123-123: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 124-124: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 125-125: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 126-126: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 159-159: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 160-160: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 161-161: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
[error] 162-162: The enum member should be initialized with a literal value such as a number or a string. (lint/style/useLiteralEnumMembers)
Additional comments not posted (2)
apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (1)
95-95
: The addition ofsubpoenaType
todistrictCourtFields
is appropriate for the intended functionality.libs/judicial-system/types/src/lib/case.ts (1)
231-234
: The addition of theSubpoenaType
enum is correctly implemented and aligns with the PR's objectives.
Closed in favour of #15198 |
Add subpoena type to case table
Asana
What
Add a new field,
subpoenaType
to DB.Why
This is a part of the new indictment cases flow we are creating.
Checklist:
Summary by CodeRabbit
New Features
subpoenaType
field to cases, allowing users to specify the type of subpoena (e.g., ABSENCE, ARREST).Database
subpoena_type
column to thecase
table.GraphQL
Case
query andUpdateCase
mutation to include the newsubpoenaType
field.