-
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
fix(j-s): Roles Rules #15416
fix(j-s): Roles Rules #15416
Conversation
WalkthroughThe updates to the 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 (6)
- apps/judicial-system/backend/src/app/modules/case/case.controller.ts (7 hunks)
- apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (8 hunks)
- apps/judicial-system/backend/src/app/modules/case/test/caseController/getRulingSignatureConfirmation.spec.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/case/test/caseController/getRulingSignatureConfirmationRolesRules.spec.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignature.spec.ts (3 hunks)
- apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignatureRolesRules.spec.ts (2 hunks)
Files skipped from review due to trivial changes (2)
- apps/judicial-system/backend/src/app/modules/case/test/caseController/getRulingSignatureConfirmation.spec.ts
- apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignature.spec.ts
Additional context used
Path-based instructions (4)
apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignatureRolesRules.spec.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/test/caseController/getRulingSignatureConfirmationRolesRules.spec.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/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/backend/src/app/modules/case/case.controller.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."
Learnings (3)
apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignatureRolesRules.spec.ts (1)
Learnt from: gudjong PR: island-is/island.is#15241 File: apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverSignedRulingToPolice.spec.ts:41-42 Timestamp: 2024-06-14T15:09:49.085Z Learning: User gudjong prefers not to make changes to error handling messages in test setups at this time.
apps/judicial-system/backend/src/app/modules/case/test/caseController/getRulingSignatureConfirmationRolesRules.spec.ts (1)
Learnt from: gudjong PR: island-is/island.is#15241 File: apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverSignedRulingToPolice.spec.ts:41-42 Timestamp: 2024-06-14T15:09:49.085Z Learning: User gudjong prefers not to make changes to error handling messages in test setups at this time.
apps/judicial-system/backend/src/app/modules/case/case.controller.ts (2)
Learnt from: unakb PR: island-is/island.is#15378 File: apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.tsx:86-100 Timestamp: 2024-06-27T14:37:07.823Z Learning: User unakb prefers explicit case handling in switch statements for key functionalities like `getRulingDecisionTagColor` to ensure clarity and avoid assumptions that a case was overlooked.
Learnt from: gudjong PR: island-is/island.is#15393 File: apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts:28-28 Timestamp: 2024-07-01T13:14:45.714Z Learning: The `DeliverCancellationNoticeDto` import in `apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts` is used in the `deliverIndictmentCancellationNoticeToCourt` method.
Additional comments not posted (9)
apps/judicial-system/backend/src/app/modules/case/test/caseController/requestRulingSignatureRolesRules.spec.ts (1)
2-2
: Import change is correct.The import of
districtCourtJudgeSignRulingRule
aligns with the PR objective.apps/judicial-system/backend/src/app/modules/case/test/caseController/getRulingSignatureConfirmationRolesRules.spec.ts (1)
2-2
: Import change is correct.The import of
districtCourtJudgeSignRulingRule
aligns with the PR objective.apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts (5)
2-7
: New entities and imports are correct.The addition of
CaseTransition
,CaseType
,User
, andUserRole
aligns with the PR objective.
198-229
: Updates toprosecutorTransitionRule
are correct.The updates to include
CaseTransition.DENY_INDICTMENT
and the logic for handling transitions align with the PR objective.
240-244
: Updates toprosecutorRepresentativeTransitionRule
are correct.The updates to allow prosecutor representatives to ask for confirmation, cancellation, and delete align with the PR objective.
254-266
: Updates todefenderTransitionRule
are correct.The updates to handle the withdrawal of appeals align with the PR objective.
347-363
: Introduction ofdistrictCourtJudgeSignRulingRule
is correct.The new rule to allow district court judges to sign rulings aligns with the PR objective.
apps/judicial-system/backend/src/app/modules/case/case.controller.ts (2)
768-768
: Change to usedistrictCourtJudgeSignRulingRule
is correct.The update aligns with the PR objective of allowing district court judges to sign rulings.
805-805
: Change to usedistrictCourtJudgeSignRulingRule
is correct.The update aligns with the PR objective of allowing district court judges to sign rulings.
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/backend/src/app/modules/case/guards/rolesRules.ts (8 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/judicial-system/backend/src/app/modules/case/guards/rolesRules.ts
Datadog ReportBranch report: ✅ 0 Failed, 19817 Passed, 0 Skipped, 18m 23.25s Total Time 🔻 Code Coverage Decreases vs Default Branch (1)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15416 +/- ##
==========================================
- Coverage 37.02% 37.02% -0.01%
==========================================
Files 6541 6541
Lines 133684 133664 -20
Branches 38240 38231 -9
==========================================
- Hits 49501 49487 -14
+ Misses 84183 84177 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file 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.
Nice, love the explanatory comments on the PR as well 🙏😁
* Fixes and improves roles rules logic * Fixes typo --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Roles Rules
Fulltrúi hjá sækjanda - yfirfara réttindi hlutverks
What
Why
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Tests